Skip to main content

Replies sorted oldest to newest

If you are creating an HTML mail template for an automated Email campaign you have to put all of the HTML tags in yourself. If the image is to be hosted on a web server then something like

<img src="http://www.foo.bar/whatever/image.gif">

should work, assuming that the recipient's mail client does not automatically block linked images.

It is also possible to have the image imbedded in the mail message itself, but that is more involved. One approach would be to send a sample of the message to yourself and then use a mail client like Mozilla Thunderbird to view the message source. That would show you the MIME magic required to make it happen.
Using the procedure I outlined above, this is how Mozilla Thunderbird handles an embedded graphic:

Date: Mon, 07 Nov 2005 10:28:38 -0500
From: Some Guy <foo@mydomain.com>
MIME-Version: 1.0
To:  yabba@dabba.doo
Subject: embedded graphic
Content-Type: multipart/related;
 boundary="------------090805080009060203070308"

This is a multi-part message in MIME format.
--------------090805080009060203070308
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<font size="-1"><font face="Verdana">This message has an embedded
graphic here:<br>
<br>
<img alt="dive flag" src="cid:part1.04000608.06020307@mydomain.com"
 height="48" width="48"><br>

<br>
This is the end of the message.<br>
</font></font>
</body>
</html>

--------------090805080009060203070308
Content-Type: image/gif;
 name="dive_flag.GIF"
Content-Transfer-Encoding: base64
Content-ID: <part1.04000608.06020307@mydomain.com>
Content-Disposition: inline;
 filename="dive_flag.GIF"

R0lGODlhMAAwAJH/AP////8AAAAAAAAAACwAAAAAMAAwAEACuJSPqcuNEYCcFMCLs97acFiF
39gJ5BZWZ+atZ0p9rUtf8BQYd81js32z9Ea/UVA4LPKOK+Uww/SZnsuUTkTlXXfZ0y/aLXHA
YSc02DWP0T01iUxyu+DiMJDLmtrPeLk96LcHUrGFI+glAHNIlIi3KBXB9ggxQ7dXZJmmh5H5
pNaptYkiSRUIikhzKiP6QuoSqKEK+SSbw1rlyAH75ponmLk71xucSkpcE3WMC6Pcc9M8ZOUw
TV1tUAAAOw==
--------------090805080009060203070308--

Add Reply

Post
LEGAL INFO
CONTACT US
Copyright 2007-2018 Advoco Solutions Ltd. All Rights Reserved.
×
×
×
×
Link copied to your clipboard.
×