Click here to Skip to main content
15,888,239 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi All,

I am sending an email to members from C# console application.

I want to show images in email. I am having the images in Base64String format.
I tryed with following code but it is not working. The image is not displaying in email-

HTML
image.src="data:image/jpeg;base64,"+imgData;


How to make it work?

Please suggest.

Thanks in advance for your suggessions.

--Avinash
Posted
Comments
Sergey Alexandrovich Kryukov 13-Dec-12 23:35pm    
Good question, a 5. This is not quite apparent but important e-mail feature.
—SA

1 solution

You need to use multipart e-mail and the special URI scheme "cid:". For further detail, please see my past answer:
Sending HTML attachment with images[^].

See also: http://en.wikipedia.org/wiki/URI_scheme[^].

—SA
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900