We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


HTML email - is this a good example.

Medium Priority
Last Modified: 2012-06-27
Hello there.  Could you look at the HTML email  and let me know if you think, in your personal opinion, that the HTMl email is fine.  

By fine I  mean, not bloated with code and will basically be read on most peoples email clients.

The image size is going to come down, a lot.  But just for now I would like to make sure it can be viewed on most clients machines.   The only problem is that the email is just going to consist of an image - so what can I do if users have images blocked?  Should I attach a .txt file with the text on the image?   I have tried looking into sending an MIME, but this is beyond my abilities at present.  

It would help if I could find one single MIME example, or explanatory code, but I cannot.  

I will add a link to a folder which will contain the HTML mailer.   I send the mail by opening in IE > Send by email > Outlook > add subject + recipients > send.

Any feedback would be welcomed.  Thanks.

Zipped folder.
Watch Question

Top Expert 2008

This is just a plain HTML file with one image in it.

The HTML file has some syntax errors, so try the one attached in the code snippet box below (valid XHTML1.0):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<title>Title of your Mailing</title>
<body style="margin: 0px; border: 1px solid black; background-color:#423E24;">
<table width="100%" cellpadding="10" cellspacing="0">
<td valign="top" align="left"><img src="http://www.minopromtest.co.uk/img/Codexf.gif" alt="Codex Print List " width="720" height="513" /></td>

Open in new window


Hello Agriesser

Thanks for you feedback.  I had intentionally left out teh DocType, title etc..   I read somewhere that it over bloats the code.

Also, do you think its worth investing my time in trying to send a text-based alternative MIME plain text file with this image?  As "some" people may have images turned off?  

Or would you think that would be a waste of my time?  Should I just attach a plain text file as well?

Thanks for your input.
Top Expert 2008

Leaving the DocType out cripples the code, nothing more. When you need to send HTML mails, you should take care about them being valid and a DocType declaration is the first thing you need for valid HTML.

Besides that, if it's really just the image you're going to send: What's the intended audience for this mail?
Can you summarize the mail user agents they're using or not?

External images usually will never be displayed automatically by good MUAs, but there's this "Click to load image" button in those MUAs then so that should not be the problem.

But, there might be several other problems with this e-mail:
spamassassin (a popular spam detection software) will assign you quite some scoring points for having an e-mail with just an image and no text in it, so that's what most spammers do. If possible, try to put some text around the image explaining what the recipient is about to read in your mail then chances are higher that people will load the external image.

Most modern MUAs will also properly display a plain text e-mail with an attached image inline (so for the end user, it looks as if the image is "part" of the mail body and not an attachment).

But that depends on the MUA the user is using.

Out of my experience: If you need the e-mail to look exactly the same on all mail user agents, use HTML (for complex layouts and/or images) and if necessary, upload the HTML file to one of your webservers and add a "Read this mail as webpage" link at the top or at the bottom where the user can click on it and read the HTML file in his browser.

If the HTML is valid and has a good text/image ratio, you will not have problems with spam filters.


Hello Agriesser - thanks for the feedback.

I'm doing this mail for one of my bosses other companies.  Basically I got given that image and asked to make it mailable.   I have expressed that indeed it might be stopped by some spam-filters and do they want to put any text on the page - but they are adamant that they only want this image and the customer base will understand.  

But I will insist that we put some text above the image saying "click here to view image information" and have that link which takes you to a webpage describing the various printers on the image.

The target audience is varied I would say, and therefore there will be multiple email clients.  

But, like I said I will add some text and try to balance the image out to improve chances that the filters will not stop it.

~Thanks mate
Top Expert 2008
Yes, I know, this will be a problem when the bosses are a bit ignorant about the technical details. I have to face that every second day too :)

But, there's always text you can include in the mail to make it more spamfilter friendly, even if it's hidden.
What I personally do is to add a headline at the top with the text from the subject line and at the bottom, add something like:

This mail was sent at $DATE to $RECPTMAIL.

For more information, visit our website at http://BLAHBLAH.com

This is usually enough text for a good image/text ratio.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


Thanks Agriesser - I did not think about putting some hidden text on the page.  But your suggested text will do fine!

Thanks a lot.


Just one more question.

I assume the variables $DATE to $RECPTMAIL $YEAR are compiled using PHP - therefore does my whole HTML email have to be saved in .php for them to called when the mail is loaded?

Top Expert 2008

They were just placeholders for the actual date. If you want to send a bulk mail to 60,000 recipients at once, you can just fill them in with the current date before sending them.

If you want to send one mail per recipient, you need to think about a way to automate this, either by using some mass mailing software available (as outlook plugin, as windows application, as shell script, etc.) or by doing them all manually, depending on how many recipients there are.


Ok, thanks Agriesser - thought for a moment that the actually recipients where being dynamically entered when they click the email - they would be good.

However, I think we have a staff member somewhere who will be sending the email all day, and adding subjects..  I thought my job was boring! :)

Thanks for the info!
Top Expert 2008

That's possible. I'm doing that for all my mass mailing, but I'm using a small script on a linux box for that to happen (you can then even have personalized subjects, greetings, etc.) and much more with just one "click".

Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.