Questions tagged [html-email]

HTML used to format emails (message content, not email addesses)

Although the HTML used to format emails is the same as that used to create web pages, it has a different set of problems and best practices.

Code Validation

Since most email clients don’t follow web standards and there are no email-specific standards in place, properly coded HTML emails will not pass HTML validating because, if coded properly, nearly all of the code within an HTML email is likely to be comprised of depreciated elements.

Client Code Compatibility

In working with HTML emails, much of the functionality possible in typical web development is not possible in email. Good practice, is to restrict code usage to that which is XHTML1.0 compliant. Recent upgrades to many platforms have allowed for some loosening of that restriction and it is now common for people to use the HTML4.0 compliance standard.

DOCTYPE

The recommended doctype for HTML email is XHTML 1.0 Strict. The reason for this is because, regardless of any alternative doctype definition, Gmail will impose XHTML 1.0 Strict regardless and of the two clients which impose their own doctype, Gmail has the largest percentage of users so it is only logical to confirm to the standard that will be imposed whether you like it or not.


Below is a list of Email Clients and Their Treatment of !DOCTYPE as well as expected results.

STRIP or IGNORE your DOCTYPE entirely:

  • AOL
  • Android Gmail Application
  • Lotus Notes 6.5, 7, 8 and 8.5
  • Outlook 2007 and 2010
  • Thunderbird 2 and 3
  • Yahoo

    Results:

    • Box model padding becomes an issue when viewing your email in IE vs Firefox
    • In IE 8, CSS padding on TABLEs are reset to “0″ – for example:
    • Center tags with a set width will no longer be centered in all browsers except IE. For example:
    • In IE, the minimum height on any EMPTY block element is 19px This is particularly important when using spacer divs.
    • In all browsers except for IE 6 and 7, paragraph elements have a default top and bottom margin of “0″ whereas it would otherwise use a default top and bottom margin of 16px.
    • In IE 8, you might see an exaggerated left margin on OLs and ULs, you will need to define the margins with inline CSS to correct this.
    • Some special characters are not supported

ACCEPT your DOCTYPE

  • Android Mail Client
  • Entourage 04 and 08
  • iPad and iPad Gmail
  • iPhone and iPhone Gmail (iOS3 & iOS4)
  • Kindle Fire
  • Live Mail
  • Outlook 2003
  • Outlook Express
  • Thunderbird 6
  • Windows Mail

Impose Their Own Standards

  • XHTML 1.0 Strict – Gmail & Hotmail

    Results:

    • Line height for small fonts may become more prevalent in all browsers except for IE. This is only an issue when using inline elements, use paragraph elements or TDs for formatting your small fonts.
    • You might see a small space below each of your images. A common fix is to useinside your image tag.
    • Some special characters are not supported
    • There may be a difference in the way your text links appear (colored underlines)
  • Yahoo Classic – HTML 4.01 Transitional

Mailchimp KB

SlideShare

SixRevisions guideline

5038 questions
1
vote
1 answer

iOS Rendering Email half the size

Issue I tested my email in Litmus and it renders at half the size of the email window only in iOS mobile phones as shown here. It sounds like Apple made this update in iOS 10 so users would have the ability to zoom into their email. I need help…
spz1
  • 47
  • 1
  • 9
1
vote
1 answer

Gmail Clear Images When Sending Email via Mailgun

I'm sending an email using Mailgun, the content of the email is HTML but Gmail clears images, even the img tag. The images are stored in a public S3, and it's accessible by the browser. Does someone know what causes this problem?
HHead26
  • 69
  • 1
  • 5
1
vote
1 answer

Table slightly breaks when zooming in and out of page

I am using tables to structure a HTML email. When I view the page at 90% zoom (on Chrome), my tables look fine. But when I zoom to 100% and beyond, my table shifts by a few pixels, and I don't know why. 90% Zoom: 100% Zoom (and beyond): I want…
Freddy
  • 683
  • 4
  • 35
  • 114
1
vote
1 answer

Bold text while pasting in Gmail composer

I have to copy some text from a plain text file into Gmail's mail composer and make some parts of that text bold. I can obviously boldface those specific parts manually after pasting it to the composer. But is there a way to do this automatically…
Sagar
  • 3,107
  • 2
  • 26
  • 35
1
vote
2 answers

ExactTarget e-mails inconsistently rendering Korean or Chinese characters

I have a small ASP.Net MVC site that is scraping content from a client site for inclusion in an ExactTarget-generated e-mail. If a content area uses hard coded Chinese or Korean characters, the e-mails render properly on all clients. When an area…
BobC
  • 412
  • 1
  • 7
  • 20
1
vote
1 answer

In iPhone 6+ gmail app email template is not responsive, else everywhere it is working fine

I am having an issue with iPhone 6+ Gmail app in that particular device I am getting a responsive issue, my email template is not responsive in that device else everywhere it is working fine. can you please help in this condition
Shahil Mishra
  • 470
  • 3
  • 14
1
vote
1 answer

How to use display none on outlook 2007, 2010, 2013 in html email

I am trying to get a some content to display none in desktop and show in the mobile version. It works fine in most email clients but outlook 07,10,13 on windows devices are giving me a problem
jdip88
  • 427
  • 2
  • 9
  • 23
1
vote
0 answers

HTML Email - Font Resizing on Gmail App for Mobiles

I have an issue with an HTML Email I've developed for a client. They're all using Gmail on Android phones to test and preview what's being sent and also GSuite. The problem I'm having (font being shrunk) is happening in both, but not in my Litmus…
AP_19
  • 31
  • 6
1
vote
0 answers

Mailto line break not working on yahoo

I am having an issue with line break not working on yahoo. I have used this code %0D%0A and it work well on Gmail, Outlook, etc. but not on Yahoo. But when using
it will work on yahoo but not on outlook. Does anybody here can help that would…
zen
  • 383
  • 3
  • 10
  • 21
1
vote
0 answers

Email VBA and HTML

I would like to send a complex Email using VBA and HTLM, but I cant achieve this. I am used to sending simple Email, with some links and some variables, but what I need to do here is more complex. I need to send an Email that looks like the one in…
user1876708
  • 67
  • 2
  • 9
1
vote
2 answers

Outlook 2016 doesn't display the html

I have an email in html that should works in all platofrms, however I have an issue in Outlook 2016 that the content is not being displayed. My email has
1
vote
1 answer

Font not set to Arial in outgoing email (by SendGrid) from my .NET windows app

The text in the outgoing emails from my app is plain non-proportional text. I tried to make it Arial. But it is still not Arial. Here is what I send to SendGrid, which sends the email:

Message

Doug Null
  • 7,989
  • 15
  • 69
  • 148
1
vote
0 answers

HTML email css support: Outlook.com vs Office365

I'm coding up some HTML email templates — something that I do rarely enough that I always find myself re-googling to remind myself of the latest constraints and pitfalls. A couple of good resources for css support in different email clients and…
RickL
  • 524
  • 1
  • 5
  • 15
1
vote
0 answers

How is SMTPJS for sending e-mails with only HTML pages?

How feasible is https://smtpjs.com/ to integrate with HTML page to send e-mail via contact form module. I am working with one HTML page and need to integrate the e-mail services. Seems its free, but any thing need to be include in the page for the…
Prajwal Bhat
  • 303
  • 2
  • 5
  • 21
1
vote
3 answers

Swiftmailer working on localhost but not in production

On my localhost (Linux Mint OS) Swiftmailer is working fine with the following code, but whenever I move it up to my server is just hangs at the send function and then gives me an internal server error. I currently have my email setup through Google…
Metropolis
  • 6,542
  • 19
  • 56
  • 86
1 2 3
99
100