Hi,
Please find the attachment .msg file and run through this sample. It is missing HTML body information. Please check and give me solution as soon as possible. I have downloaded the latest Aspose.pdf.dll ver 8.7.0 .net 4.0. We just purchased the latest license.
We are converting the email body message as TIFF image.
Please rename the extension .txt to .msg and run the below sample.
privatevoid BtnFindStr_Click(object sender, EventArgs e)
{
byte[] bFile;bFile =
File.ReadAllBytes(@"C:\Email\InBox\E201312110000003\E201312110000003.msg"); //Attachment is not working//bFile = File.ReadAllBytes(@"C:\Email\Test\FW 0631 Sacramento Claim # 027547175-02.msg"); //Attachment is workingMemoryStream InputData = newMemoryStream(bFile);Aspose.Email.Mail.
MailMessage msg;Aspose.Email.Mail.
MessageFormat format = Aspose.Email.Mail.MessageFormat.Msg;msg = Aspose.Email.Mail.
MailMessage.Load(InputData, Aspose.Email.Mail.MessageFormat.Msg);string MsgBodyString = string.Empty;if (msg.IsBodyHtml){
MsgBodyString = msg.HtmlBody;
int startPos = 0;int NextPos = 0;string FileNameString = string.Empty;startPos = MsgBodyString.IndexOf(
"src=" + '"' + "cid:")+9;NextPos = MsgBodyString.IndexOf(
"\"", startPos, MsgBodyString.Length - startPos);FileNameString = MsgBodyString.Substring(startPos, (NextPos - (startPos)));
if (FileNameString.Substring(0, FileNameString.IndexOf("@", 0)) != string.Empty){
}
}
}
Thanks
P. Saravanan.