Yes, please use the class SecureEmailManager
that allow to add and check signatures of MailMessage and MapiMessage objects.
For example:
var fileName = "message.msg";
var privateCertFile = "certFile.pfx";
var privateCert = new X509Certificate2(privateCertFile, "password");
var msg = MapiMessage.Load(fileName);
var signedDetached =
new SecureEmailManager().AttachSignature(msg, privateCert, new SignatureOptions { Detached = true });
if (signedDetached.IsSigned)
{
Console.WriteLine("Detached Signature Attached Successfully.");
}
var signedNonDetached =
new SecureEmailManager().AttachSignature(msg, privateCert, new SignatureOptions { Detached = false });
if (signedNonDetached.IsSigned)
{
Console.WriteLine("Non-Detached Signature Attached Successfully.");
}
Hello,
I tested this code to sign Emlx emails, and found that:
either it makes invalid emails
or Aspose itself cannot parse the signing certificate itself
To reproduce, please test 3 emlx files created using latest Aspose against this code:
Dim MyMailMessage As Email.MailMessage = Email.MailMessage.Load(file, loadOpt)
Dim MySmimeResult As Email.SmimeResult = New Email.SecureEmailManager().CheckSignature(MyMailMessage)
MsgBox(MySmimeResult.Error.Message)
@australian.dev.nerds
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): EMAILNET-41315
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
@australian.dev.nerds
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): EMAILNET-41317
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
Hello,
What was 41345 which is marked as resolved and what’s the 41317 which is new?
I though 41315 was for emlx issue but no idea about the latter. thanks
Please never mind that. EMAILNET-41315 has been opened to investigate the problem. The problem appeared to be more extensive, so we created a new ticket to continue the deeper investigation. So, further refer to EMAILNET-41317.
Thanks.
It seems you’re asking about an alternative for the current AttachSignature methods. This approach provides flexibility, so we will consider this enhancement.
Hello,
In 24.4 release notes: EMAILNET-41317 Provide the option to attach a signature while saving a message
Is this for the invalid emlx signing or hash algorithm overload or else?
Thanks.