views:

28

answers:

2

I want to ....

create a html-email containing several images (company header, etc).
The images shall be displayed as email content, not as an attachement.

So how is the best way to do this?


I'm aware of two possibilities:

  • embedded images send as attachment (<IMG src="cid:321353119@02062010-119E">)
  • images are placed on the server (<img src="http://myserver.com/mypicture.gif"&gt;)




+1  A: 

Images on your server -

  • Saves storage on mail servers
  • Decreased bandwidth for you to send
  • Keeps the download smaller for the end-user
  • Gives you control over the images post-send
Dan Heberden
+3  A: 

Many mail clients will block access to external images (your second method) by default. However, most will display the images in your first method without blocking.

The reason for this is that you can use the fact that the mail client accessed the server to download the external images as a way of "tracking" whether the email was opened and therefore viewed by the user - it's a privacy concern. There is no such issue with attached images.

The downside of your first method is that it increases the size of the messages you send. Nobody likes to receive a 200KB message with 199KB of logos and junk and 1KB of actual content...

Dean Harding
But even gmail blocks embedded images until you click the 'display images' link.. (not to mention the background-image css attribute - hmph, lol)
Dan Heberden
@Dan Heberden: I didn't know gmail did that, seems rather pointless... I don't know of any other mail client that blocks the display of attached images at least.
Dean Harding
@Dan Heberden: just tried and gmail worked with embedded images (at least on my account using the web client). It just blocks external images by default so you have to manually accept downloading them.
hkda150
Yeah, external of course - well great news about embedded! I'm sorry to prompt you to do a test based on my incorrect info. Thanks for clarifying :)
Dan Heberden