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

Free Support Forum - aspose.com

Saving unsent encrypted message disables Sent button

If I save a MailMessage (i.e. msg.Save(savePath, SaveOptions.DefaultMsgUnicode)) and reopen it in Outlook, the Send button is available. However, if I encrypt a message (msg = msg.Encrypt(certificates.ToArray()), save it, and reopen it in Outlook, the Send button is not available (even though the message was never sent). Any ideas how to fix this?

@NASAKSCITSecurity

We have logged this issue with ID “EMAILNET-39179” for further investigation. You will automatically be informed here once we have more information to share.

@NASAKSCITSecurity

Please try the following code snippet:

X509Certificate2 publicCert = new X509Certificate2(publicCertFile);
X509Certificate2 privateCert = new X509Certificate2(privateCertFile, "anothertestaccount");

// Create a message
MailMessage msg = new MailMessage("atneostthaecrcount@gmail.com", "atneostthaecrcount@gmail.com", "Test subject", "Test Body");

// Encrypt the message
msg = msg.Encrypt(publicCert);
if (msg.IsEncrypted == true)
{
    msg.Save(@"D:\Aspose\UserData\CreatEMLFileAndConvertToMSG_out.msg", SaveOptions.DefaultMsg);
} 

it is important to note that the API deletes header X-Unsent when it Encrypts the message otherwise Outlook opens this message as non encrypted.

Moreover, If the issue is not resolved by above code example then please provide draft of message encrypted by Outlook. Furthermore, private keys may be needed for detailed investigation. You may share private keys in private message. For this purpose, please find “Message” button by clicking on my name.