HTML email headers

(5 posts) (2 voices)


  1. duane, Member


    I'm trying to debug a responsive email design I have created using a template and record. As I compare a working version (dummy test sent via mailchimp) and the mydbr version, four things have some up so far:

    1. mydbr seems to set
      Content-Type: text/html; charset=us-ascii
      while in mailchimp it is
      Content-Type: text/html; charset="utf-8"
      - is there anyway to set this in mydbr?
    2. The mydbr email doesn't seem to have the doctype element at all - is there a way to add it (e.g.
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    3. The html opening tag in mydbr is just the bare min (<html>) - is there a way to extend it like:
      <html lang="en" xmlns="" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
    4. the CSS head file I add via dbr.head doesn't seem to get added to the email html head within the script tags. Instead another is added - is this the mydbr default and is there a way to include my own css in the email instead?
    5. In fact, none of the header lines added via dbr.head are in the email version despite being between the record start/stop tags. Is there a way to ensure they are added? e.g.
      <meta name="viewport" content="width=device-width, initial-scale=1.0">



  2. duane, Member

    I think I found where email harders are hardcoded/static:


    So I can just edit that manually for everything except for making the html 'part'

    Content-Type: text/html; charset="utf-8"

    Is that right? Would it be overwritten with each update?

  3. duane, Member

    Update: I 'solved' my mydbr email display problems by putting my hardcoded values in the extensions/mail/mail_header.html file.

    Since this might be overwritten each update, a few ideas for allowing users to retain their changes:

    1. We upload a different 'static' email_header file and you add a one-line way to specify its name and location so we can bypass the default
    2. OR if we have dbr.head settings they override the mail_header.html file. This would still mean we'd need a way to customise the doctype and <html> tags.

    What I still can't find a way to overwide is making the email multipart header to be

    Content-Type: text/html; charset="utf-8"

  4. myDBR Team, Key Master

    we've added a new command dbr.mail.header_file, which allows for you to define the file to be used as the header / CSS definition. The file location base is user/, so you can use:

    select 'dbr.mail.header_file', 'my_mail_header.html';

    and myDBR will use the file user/my_mail_header.html.

    What I still can't find a way to overwide is making the email multipart header to be

    Content-Type: text/html; charset="utf-8"

    myDBR will automatically detect based on the content of the file if utf-8 is needed and use it when necessary.

    myDBR Team

  5. duane, Member

    Super - thanks for the quick response (as usual) and adding the customisation ability. I'll update and try now.

    As for the content-type file encoding, OK - I'll give it a try.




You must log in to post.