Hello Aspose Team,
Hi Shital,
Hello Team,
Hi Shital,
Hello Team,
Hi Shital,
The issue is yet to be investigated and fixed in the upcoming version of Aspose.Email for .NET 6.2.0. We are afraid that we could not find any work around method to get the desired output. If the issue is of critical nature, you can consider subscribing to our Priority support service where the issues are dealt on priority basis. However, please note that if the issue involves complexity, it may take time even if the issue is considered on priority basis.
You can use the MapiMessageFlags.MSGFLAG_UNSENT to mark the message as sent/uneditable. Please try it at your end and let us know your feedback.
Sample Code:
MapiMessage mapi = new MapiMessage();
mapi.Subject = “Hello Test mail”;
mapi.SetBodyContent(File.ReadAllText(“html_body.html”), Aspose.Email.Outlook.BodyContentType.Html);
mapi.SetMessageFlags(mapi.Flags & ~MapiMessageFlags.MSGFLAG_UNSENT);
mapi.Save(“Saved_using_Aspose_Mail_message_6_1.msg”);
Hi Shital,
As a work around, could you please try the following sample code and let us know your feedback?
Sample Code:
MapiMessage mapi = new MapiMessage();
mapi.Subject = “Hello Test mail”;
mapi.SetBodyContent(File.ReadAllText(“html_body.html”), Aspose.Email.Outlook.BodyContentType.Html);
mapi.RemoveProperty(MapiPropertyTag.PR_RTF_COMPRESSED);
mapi.Save(“Saved_using_Aspose_Mail_message_6_1.msg”);
Hello,
Hi Shital,
Hello,
Hi Shital,
Please use the following sample code to add inline image using Mapimessage.
Sample Code:
var imgName = "Desert.jpg";
string htmltext = @"this is a test
this is a test
this is a test
this is a test this is a test
this is a test this is a test
this is a test this is a test
";
MapiMessage mapi = new MapiMessage();
mapi.SetBodyContent(htmltext, BodyContentType.Html);
mapi.Attachments.Add("Desert.jpg", File.ReadAllBytes(imgName));
mapi.Save("MapiWithInlineImage.msg");
Hi Shital,
Please make the following corrections:
-
src="cid:image001.jpg" alt="Email Migration Clients"/>
-
p1 = MapiMessage.FromMailMessage(a1, MapiConversionOptions.UnicodeFormat);
or use the MapiMessage constructor:
p1 = new MapiMessage("hello@gmail.com", "hello@gmail.com", "", "");
Hi Shital,
Hello Team,
Hi Shital,
You may please give a try to the following sample code and let us know the feedback:
private static void Email_689821()
{
GenerateMessage("image002.jpg");
}
private static void GenerateMessage(string newImageName)
{
MapiMessage p1 = p1 = new MapiMessage("hello@gmail.com", "hello@gmail.com", "", "");
string text = File.ReadAllText("test_html.html");
text = text.Replace("src=\"", "src=\"cid:");
text = text.Replace("image001.jpg", newImageName);
File.WriteAllText("test_html.html", text);
p1.SetBodyContent(File.ReadAllText("test_html.html"), Aspose.Email.Outlook.BodyContentType.Html);
p1.RemoveProperty(MapiPropertyTag.PR_RTF_COMPRESSED);
p1.Attachments.Add(newImageName, File.ReadAllBytes(path + newImageName));
p1.Subject = "Hello Test";
p1.SetMessageFlags(p1.Flags & ~MapiMessageFlags.MSGFLAG_UNSENT);
p1.Save("test_inline.msg");
}
If it does not fulfill your requirement, please explain in detail what do you mean by the following:
Shital diwate:
How can we change the scr=“cid:attachment-file-name” in html body at run time.
We cannot manipulate the content on HTML body.
Its not possible !!!
The issues you have found earlier (filed as EMAILNET-35121) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
Hello Team,