Remove all mydbr formatting and include css in head

(3 posts) (2 voices)
  1. maron, Member

    Hi.

    I'm trying to send an email out of mydbr - it is sent through an css inliner which then delivers it to various mailboxes.

    However the css inliner requires that the head section contains the css to be inlined - so I need to add something like the following and be able to send it through the mail feature. I already succeded by putting the css in the body section - but the inliner doesn't process it unless it's in the head section.


    <head>
    <title>I need CSS in the head section</title>
    /** No mydbr css or javascript */
    <style type="text/css">
    /** Inline css goes here */
    </style>
    </head>
    </body>
    Email content
    </body>
    </html>

    As an addition in this case there is no need for any additional mydbr output for this report - I know I can disable most of it by adding &hdr=0 to the url - but in this case my procedure looks like this - could I somehow suppress the output of the mydbr css and javascript while adding my own css in the head.


    DROP PROCEDURE IF EXISTS sp_DBR_email_campaign
    $$
    CREATE PROCEDURE sp_DBR_email_campaign(inCampaignId int)
    BEGIN
    select 'dbr.title','';
    select 'dbr.record','begin'; call sp_DBR_email_campaign_design(inCampaignId, 0); select 'dbr.record','end'; select 'dbr.mail','1';
    select 'support@mydbr.com', 'Hello Mydbr', 'Mydbr is great';
    select 'dbr.mail.debug', 1; END
    $$

    P.S. I know I can add css to the head with javascript - this doesn't work in this case as I'm sending the output of the report via email.

  2. myDBR Team, Key Master

    Hi,

    dbr.mail is an extension to myDBR and it's source code is fully open on myDBR. If you want to modify the CSS included in the mail header, take a look at the mydbr/extension/mail/mail_header.html.

    There are couple of options you could take.

    1) Extend the current dbr.mail functionality to have capability to include own CSS (the best solution)
    2) Create your own extension based on dbr.mail and make it look your own (duplicate functionality)

    You can modify the mail_header.html directly so you can test your code with targeted mail clients. Please note that modifications outside mydbr/user do not survive the updates.

    We can include the 1) in future myDBR versions, but if you make modifications that implement it, please consider sharing that with others.

    --
    myDBR Team

  3. myDBR Team, Key Master

    Hi,
    as is was just a minor change, we decided to put it into the latest build. mydbr/user-direcotory now contains a file mail.css where you can put your own styles to be used with dbr.mail. You can edit the file content using myDBR's 'Server side files'-editor.

    --
    myDBR Team


Reply

You must log in to post.