We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Converted MSG giving open file message

I successfully converted a .eml to a .msg. When I try to open the .msg after it is attached to an email, I am getting a popup. The message is 'You should only open files from a trustworthy source." How do I avoid this message without unchecking the box "Always ask before opening this type of file"?

How do I make this a 'trusworthy source'?

Hi Virginia,


Thanks for your inquiry. Your query is more related to Aspose.Email API. I am moving your request in Aspose.Email forum where you will be guided appropriately.

Best regards,

Hi Virginia,

Could you please share your sample EML file with us for our investigation? I would also request you to please share your sample code with us that can be used to reproduced the issue at our end. We’ll look into it for assisting you further.

sample file has been zipped and added.

Here is the code that I used to convert the .eml to .msg and attach to the email message:

byte[] lic = File.ReadAllBytes("C:\\AsposeLicense\\Aspose.Total.lic");
Aspose.Email.License emailLic = new Aspose.Email.License();
emailLic.SetLicense(new MemoryStream(lic));
Aspose.Words.License wordsLic = new Aspose.Words.License();
wordsLic.SetLicense(new MemoryStream(lic));

if (Directory.Exists(@"\\MTLWQV01\D$\EmailImport\RiskManagement"))
_files = Directory.GetFiles(@"\\MTLWQV01\D$\EmailImport\RiskManagement");
if (_files != null && _files.Length != 0)
{
string _newname = null;
foreach (string _filename in _files)
{
{
// Load mail message
MailMessage message2 = MailMessage.Load(_filename);
if (_filename.Contains(".eml"))
{
_newname = _filename.Replace("eml", "msg");
// Save as MSG
message2.Save(_newname, MailMessageSaveType.OutlookMessageFormat);
// delete original mail message
File.Delete(_filename);
}
}
//System.Net.Mail.Attachment _attachment = new System.Net.Mail.Attachment(_filename);
System.Net.Mail.Attachment _attachment = new System.Net.Mail.Attachment(_newname);
message.Attachments.Add(_attachment);

}
}
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient(_hostName);
smtp.Send(message);
message.Dispose();

Hi Virginia,

Thank you for sharing your concern with us.

I was able to reproduce this issue at my end using the latest version of Aspose.Email for .NET 4.8.0 and have logged it as NETWORKNET-34582 in our issue tracking system for further investigation by our development team. Once there is any information available in this regard, I'll update you here via this thread.

We are sorry for any inconvenience caused to you.

Hi Virginia,

We have investigated the issue further and found that it is not something related to Aspose.Email. Please have a look here where it seems that the issue is related to Outlook. Please feel free to contact us in case of any other query in this regard.