I have the following code:
string imageSrc = "C:\Documents and Settings\menonsu\Desktop\screenScrapper\Bitmap1.bmp";
oMsg.HTMLBody = "<HTML><BODY><img src = " cid:Bitmap1.bmp@embed "/><br><font size="2" face="Courier New">" + introText + "</font>" + body + "<font size="2" face="Courier New">" + conclText + "</font>" + " </BODY></HTML>";
Microsoft.Office.Interop.Outlook.Attachment attc = oMsg.Attachments.Add(imageSrc, Microsoft.Office.Interop.Outlook.OlAttachmentType.olEmbeddeditem, null, "");
attc.PropertyAccessor.SetProperty("http://schemas.microsoft.com/mapi/proptag/0x3712001E", "Bitmap1.bmp@EMBED");
//Send the message.
oMsg.Save();
For some reason the email is just showing an x when i try to run this code...anyone know why?
See Question&Answers more detail:os