I use outlook Redemption dll for creating outlook message template with c# language.
Below is my code:
RedemptionLoader.DllLocation64Bit = Server.MapPath("~/bin/dlls/Redemption64.dll");
RedemptionLoader.DllLocation32Bit = Server.MapPath("~/bin/dlls/Redemption.dll");
Interop.Redemption.RDOSession session = RedemptionLoader.new_RDOSession();
var msg = session.GetMessageFromMsgFile(templatePath);
msg.Subject = String.Format("Report");
String ImageString = Server.MapPath("~\\FolderName") + "\\" + ImageName;
RDOAttachment Attach = msg.Attachments.Add(ImageString);
Attach.ContentID = "image1";
String htb = "<html><head><title>The Title</title></head><body><h1>This is some text</h1>Image 1<br /><img src=cid:image1><br /></body></html>";
msg.HTMLBody = htb;
msg.Save();
msg.SaveAs(newPath);
Everything work and image is saved to new location. But when i check that message template, i could not see Image anywhere. instead of image it gives me error.
Update Instead of embedded image , I tried just to attach this file. But when I open file I didn't see any attachment. I check Total Attachments with OutlookSpy, It shows me 0 attachment. Does my code wrong for attachment?