Questions tagged [html-email]

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

Filter by
Sorted by
Tagged with
357 votes
12 answers
564k views

Send HTML emails with Python

How to send HTML content in email using Python? I can send simple texts.
346 votes
2 answers
142k views

What's a 3D doing in this HTML?

I'm trying to duplicate a mailer I got into my gmail by taking a look at its code. I see a lot of this in multiple source viewers: <td style=3D"border-bottom: 1px dotted rgb(153,157, 147); border-...
Nic's user avatar
  • 13.5k
218 votes
7 answers
188k views

Best practices for styling HTML emails [closed]

I'm designing an HTML template for an email newsletter. I've learned that many email clients ignore linked stylesheets, and many others (including Gmail) ignore CSS block declarations altogether. Are ...
150 votes
5 answers
164k views

Is there an equivalent of CSS max-width that works in HTML emails?

I'm trying to create an HTML email that will display properly in all widely used email clients. I'm wrapping the whole email in a table, and I'd like it to have a width that is up to 98% of the ...
Tim Goodman's user avatar
  • 23.8k
136 votes
6 answers
97k views

When creating HTML emails, should we use html, head, body tags?

In my email views, I usually just do something like... <dl> <dt>Name</dt> <dd>Value</dd> </dl> Should I be doing it like this? <html> <head>&...
alex's user avatar
  • 485k
121 votes
8 answers
254k views

What's the best way to center your HTML email content in the browser window (or email client preview pane)?

I normally use CSS rules for margin:0 auto along with a 960 container for my standard browser based content, but I'm new to HTML email creation and I've got the following design that I'd like to now ...
Joel Glovier's user avatar
  • 7,589
113 votes
8 answers
142k views

Styling HTML email for Gmail

I'm generating a html email that uses an internal stylesheet, i.e. <!doctype html> <html> <head> <style type="text/css"> h2.foo {color: red} </style> </...
Dónal's user avatar
  • 186k
110 votes
4 answers
31k views

What is Data URI support like in major email client software?

Data URIs are a standard way to embed images and other binary data in HTML, and browser support is well documented on the web. (IE8 was the first version of IE to support Data URI, with a max 32 KB ...
joelhardi's user avatar
  • 11.1k
103 votes
2 answers
239k views

Send a base64 image in HTML email

Using a rich-text editor, our users can drag and drop a saved image from their desktop to the editor. The image appears and displays properly in the web page after they submit. Since the image is not ...
Vael Victus's user avatar
  • 4,064
95 votes
10 answers
116k views

Has anyone gotten HTML emails working with Twitter Bootstrap?

I'm using the premailer-rails3 gem which pulls styles inline for html emails, and I'm trying to get it working with Twitter bootstrap. https://github.com/fphilipe/premailer-rails3 It looks like some ...
Brian Armstrong's user avatar
94 votes
3 answers
60k views

Best Practices & Considerations when writing HTML Emails [closed]

I've been developing websites for over a decade now, but quickly found that many of my habits in developing for the web are useless when developing for email clients. This has caused me an enormous ...
90 votes
23 answers
205k views

HTML image not showing in Gmail

I'm sending an e-mail newsletter in HTML. Inside the HTML I have something like <img height='70' width='70' style='display:block' src='myDomain.com/imageName.png'> When I open the newsletter ...
Rita's user avatar
  • 1,253
86 votes
3 answers
182k views

How can I embed SVG into HTML in an email, so that it's visible in most/all email browsers?

I want to generate graphs in SVG, and email an HTML page with those graphs embedded in it (not stored on a server and shown with linked images). I've tried directly embedding the SVG, using the ...
ztforster's user avatar
  • 1,499
83 votes
4 answers
72k views

HTML email: tables or divs?

Does the HTML/CSS for an html email newsletter need to be in table format, or can I use DIVs with equal assurance it will display well cross email-client? I've downloaded a number of templates to see ...
HandiworkNYC.com's user avatar
75 votes
11 answers
208k views

Remove spacing between table cells and rows

I'm designing an HTML email template, which forces me to use tables. In the code below, I'm having trouble (1) removing the spacing below the placeholder image and (2) removing the space between the ...
Joe Mornin's user avatar
  • 8,946
72 votes
12 answers
90k views

How to get rid of "Show trimmed content" in GMail HTML emails?

I send a lot of HTML emails. The problem with GMail is, if there are more than one emails with the same subject, it hides some similar content and shows a "..." to show the "trimmed content". This ...
Munim's user avatar
  • 6,410
59 votes
6 answers
90k views

HTML formatted email not showing up at all in Gmail but is in other mail clients

I'm currently sending html formatted emails from PHP's mail() function and checking them simply to make sure they are showing up as HTML (formatting aside, I'm well aware that the formatting will vary ...
joshholat's user avatar
  • 3,381
59 votes
5 answers
86k views

Base64 encoded image is not showing in gmail

I have an embedded HTML email in which I'm using a base64 encoded image. Image doesn't show in gmail when accessing via chrome. But it works fine when accessing same mail via mail client(Mail ...
Harikrishnan's user avatar
  • 9,824
58 votes
10 answers
63k views

Why is Gmail blocking CSS in emails?

I used CSS in my email and sent it out. When I received the email in Gmail, all the CSS was disabled; however, when I retrieved the email in thunderbird or outlook, everything is OK. How would I fix ...
MemoryLeak's user avatar
  • 7,290
53 votes
1 answer
36k views

GMail displays plain text email instead HTML

My Rails 3 application sends out emails in both plain text and HTML formats. I have tested it locally using RoundCube and Squirrel Mail clients and they both display HTML version with images, links, ...
Vincent's user avatar
  • 16.2k
47 votes
4 answers
96k views

HTML Emails: fallback for mso conditional?

UPDATE 2023: This question was originally asked in 2013 - the landscape and supported technologies have changed greatly in that time. The accepted answer is functional and effective for legacy clients,...
CodeMoose's user avatar
  • 3,015
46 votes
12 answers
50k views

Gmail is ignoring "display:none"

I have a query that Gmail is ignoring display:none. What to do? In email HTML for hiding a row or div.
Sagar's user avatar
  • 1,387
46 votes
4 answers
98k views

Is there no way to embed a Google Map into an HTML email?

I have done a good amount of research and have found several "solutions" such as the static maps API and simply sending a link to a Gmap. However is there really no way to actually send someone a ...
Ben Racicot's user avatar
  • 5,568
44 votes
9 answers
66k views

Outlook 2010 overriding font-family from Arial to Times New Roman

I'm programmatically sending HTML-formatted email, and setting the font as Arial throughout (font-family: Arial;). When the messages arrive in Outlook 2010, text in table elements is in Times New ...
Tom Hamming's user avatar
  • 10.8k
43 votes
8 answers
41k views

HTML Email iOS format-detection

I just found that there is a meta tag for removing the phone number as a link in HTML on iOS. Does this work with HTML emails? <meta name="format-detection" content="telephone=no"> But is ...
Travis's user avatar
  • 2,215
42 votes
8 answers
58k views

HTML email in Gmail - CSS style attribute removed

I'm working on an HTML email and I am using MailChimp's Responsive Email Templates in combination with their CSS inliner tool. For the most part, the email looks great across the myriad of email ...
Matty B's user avatar
  • 1,018
39 votes
3 answers
12k views

Is there any sense in using the <title> tag in HTML e-mail?

When sending an HTML e-mail, is there any sense in using the <title> tag? In the PHP Manual, for instance, they use such a tag in their main sample code. However, I see no reason why an e-mail ...
user avatar
37 votes
27 answers
133k views

How do I remove link underlining in my HTML email?

<td width="110" align="center" valign="top" style="color:#000000;"> <a href="https://example.com" target="_blank" style="color:#000000; text-decoration:none;">BOOK NOW </...
pubudumj's user avatar
  • 371
37 votes
6 answers
59k views

How to send HTML email

i found a way to send plain text email using intent: final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); emailIntent.setType("text/plain"); emailIntent.putExtra(android....
Denis Palnitsky's user avatar
36 votes
2 answers
34k views

Do we still need to use <font> tags in HTML emails?

I'm taking over from someone who builds our HTML emails and the templates are filled with font tags. Is this really necessary? I know CSS support isn't great in emails, but if I set an inline style ...
punkrockbuddyholly's user avatar
32 votes
6 answers
25k views

Get the actual email message that the person just wrote, excluding any quoted text

There are two pre-existing questions on the site. One for Python, one for Java. Java How to remove the quoted text from an email and only show the new text Python Reliable way to only get the email ...
Layke's user avatar
  • 52.2k
32 votes
1 answer
53k views

Best Practices - Sending javamail mime multipart emails - and gmail

I have a Tomcat application that needs to send confirmation emails etc. I have coded the emailer with Javamail (mail.jar) to send multipart text/html emails. I based the code on the Java EE examples. ...
PrecisionPete's user avatar
31 votes
13 answers
93k views

How to force min-height on table

I have this code : <table cellspacing="0" cellpadding="0" border="0" style="width:415px"> <tbody> <tr valign="top"> <td style="font-family:Arial;min-...
markzzz's user avatar
  • 47.7k
30 votes
7 answers
201k views

CSS to make table 100% of max-width

Given the following for an email template: <style> @import url("http://fonts.googleapis.com/css?family=Open Sans"); </style> <div style="width:100%; background:#F2F2F2"> <...
Noah Goodrich's user avatar
29 votes
14 answers
108k views

HTML email link color dilemma

I designed an HTML email and I am having the following issues: First my entire design is based on a blue color so any blue text will not be readable by the reader/user, text has to be white. GMAIL ...
Asynchronous's user avatar
  • 3,957
29 votes
4 answers
344k views

Color a table row with style="color:#fff" for displaying in an email

We would like to display order details as table in an email ​<table> <thead> <tr> <th>Header 1</th> <th>Header 2</th> ...
codeandcloud's user avatar
  • 54.4k
29 votes
10 answers
51k views

How to customize the email verification email from Laravel 5.7?

I just upgraded to Laravel 5.7 and now I am using the built in Email Verification. However there is 2 things I have not been able to figure out and the primary issue is how can I customize the email ...
Wayne Fulcher's user avatar
29 votes
4 answers
60k views

Email formatting basics (links in plain text emails)

Sending an email from a server isn't quite as easy as sending it from a client. I know I can choose to send plain text or html, but I want to keep things as simple as possible. I have a link in ...
Matthew's user avatar
  • 15.4k
28 votes
1 answer
94k views

Send table as an email body (not attachment ) in Python

My input file is a CSV file and by running some python script which consists of the python Tabulate module, I have created a table that looks like this below:- tabulate_output or | Attenuation | ...
Durvesh's user avatar
  • 293
27 votes
3 answers
88k views

How to vertical align image and text cross client email templates

<table cellspacing="0" cellpadding="0" border="0"> <tbody> <tr> <td width="20">&nbsp;<img height="12" alt="" src="/CmpImg/2010/22677/924228_immunotec_bullet.gif"...
user1417094's user avatar
24 votes
5 answers
42k views

HTML Email - Is colspan allowed?

I was wondering if I use colspan attribute in a HTML table that I intend to have as an email, will email clients (Outlook etc...) understand what colspan does, as I have read that this might cause an ...
CallumVass's user avatar
  • 11.4k
24 votes
7 answers
6k views

Is it sensible to send HTML-only email these days?

I want my web app to send certain mails as HTML in order to include product images. I could of course provide a text/plain alternative as well, but is it worth the effort in this day and age? Are ...
Henrik N's user avatar
  • 16k
24 votes
3 answers
91k views

How to open an installed app from an email URL in Android? [duplicate]

I want to open my app from an email URL, basically like the example shown below for Twitter.com. Email with link: Selection to open app or browser: After you click on the app choice, the Twitter ...
Roadies's user avatar
  • 3,319
22 votes
3 answers
34k views

What does MailMessage.IsBodyHtml do?

I'm testing sending out some emails via C#, but I can't tell what effect setting IsBodyHtml to true has. Regardless of the value, whatever I send in my Body shows up with a content type of "text/...
Eddie Deyo's user avatar
  • 5,300
21 votes
4 answers
54k views

HTML email align text

I am trying to align a part of text to the right and the other part to the left in an HTML mail but in Outlook the float doesn't work. So basically I am looking for float CSS in Outlook. I know it ...
user1299846's user avatar
21 votes
3 answers
40k views

Break long words in html email in outlook 2010

I'm taking end user input and inserting it into an HTML email. But if the end user enters a long URL or really long word, it breaks my HTML layout in Outlook 2010 by extending the column or div ...
Hoppe's user avatar
  • 6,643
21 votes
8 answers
123k views

How do I send email with JavaScript without opening the mail client?

I'm writing a HTML page with a registration button that should just silently send an email without opening the local mail client. Here is my HTML: <form method="post" action=""> <input ...
j3d's user avatar
  • 9,638
21 votes
3 answers
25k views

Sending HTML email in django

In my project I've added a newsletter feed. But when trying to send emails with this function : def send(request): template_html = 'static/newsletter.html' template_text = 'static/newsletter....
crivateos's user avatar
  • 925
20 votes
10 answers
32k views

Outlook 2013 Cutting off top of image?

I am setting up an email template and the top of a few images were being cut off. This is my code for the images <td style="line-height: 0"><img src="http://domain.com/image.png"></td&...
jakecraige's user avatar
  • 2,707
20 votes
2 answers
5k views

Is it safe to use protocol relative URL in email?

There are existing discussion [1] on the use of protocol relative URL in HTML, but how about email? Will email client, or service providers like Gmail strip or modify protocol relative URL when they ...
Howard's user avatar
  • 19.5k

1
2 3 4 5
103