I would like to use the images inlined in the html body of the message but they appear as attachments.
how do i do that?
thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2004-07-30
When I want to put a background image I did create a HTML page with my pictures and use M$ OutLook Express to send email using.... Then I save email like .EML, In .eml file the images was converted in Html Boy/part
Hope this help
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The src attribute of you image tag needs to refer to the image attachment that you created. You will notice the AddImage method has an option to provide a contentId. You should specify the contentId and then use this as your for your Image source. Instead of
MailMessage.AddImage("myFile.gif"); use
MailMessae.AddImage("myFile.gif","myImage1");
and you HTML will be
<IMG src="cid:myImage1" >
Note that if you use lotus notes it does not like the lowercase "cid" and wants an uppercase "CID" (or vice-versa, I can't remember which) . Whichever MS-Outlook likes the other. So if you are in the same situation as I am, and have a mix of Notes users and MS-Outlook or other mail client users you can get around this by providing 2 src attributes in your tag.
<IMG src="cid:myImage1" SRC=CID:"myImage1"> Case sensitivity works great.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I would like to use the images inlined in the html body of the message but they appear as attachments.
how do i do that?
thanks.
When I want to put a background image I did create a HTML page with my pictures and use M$ OutLook Express to send email using.... Then I save email like .EML, In .eml file the images was converted in Html Boy/part
Hope this help
It is not possible to simply reference the images in the html used to send the email?
The src attribute of you image tag needs to refer to the image attachment that you created. You will notice the AddImage method has an option to provide a contentId. You should specify the contentId and then use this as your for your Image source. Instead of
MailMessage.AddImage("myFile.gif"); use
MailMessae.AddImage("myFile.gif","myImage1");
and you HTML will be
<IMG src="cid:myImage1" >
Note that if you use lotus notes it does not like the lowercase "cid" and wants an uppercase "CID" (or vice-versa, I can't remember which) . Whichever MS-Outlook likes the other. So if you are in the same situation as I am, and have a mix of Notes users and MS-Outlook or other mail client users you can get around this by providing 2 src attributes in your tag.
<IMG src="cid:myImage1" SRC=CID:"myImage1"> Case sensitivity works great.