Sending HTML Email with Embedded Images to Gmail AccountsMost email clients nowadays will (by default) suppress the display of images in HTML email to prevent spammers from knowing that an email was received and read. (An image URL encoded with a string that identifies the recipient is a way of letting the email sender know that the recipient has received the email. Typically, the HTTP request for the image is handled by server-side software that maps the URL to an email address, records the information, and serves the image to fulfill the HTTP request.) Gmail is no exception. By default, images within HTML email are not displayed. Unfortunately, many email clients do not distinguish between externally reference images and images that are embedded within the MIME source of an HTML email. When an image is embedded with a "cid" internal link, no HTTP request occurs, and therefore there is no communication back to an external server. Regardless, the images are suppressed by Gmail and other mail clients. Here is an example of how a message is displayed in GMail with images suppressed:
After clicking on the "Display images below" link, the email displays correctly.
The email in this example was sent using this VBScript using the Chilkat Email ActiveX component.
set mm = CreateObject("ChilkatMail2.ChilkatMailMan2")
mm.UnlockComponent "30-day trial"
mm.SmtpHost = "smtp.***.net"
set email = CreateObject("ChilkatMail2.ChilkatEmail2")
email.Subject = "2nd test HTML email with embedded graphic"
email.AddTo "Chilkat Support","chilkat.support@gmail.com"
cid = email.AddRelatedFile("dudeMail.gif")
email.SetHtmlBody "<html><body>This is a test 2<br><img src=""cid:" + cid + """><br>This is a test</body></html>"
email.From = "Chilkat <support@chilkatsoft.com>"
mm.SendEmail email
|
Downloads |