Sign on Save

Hi @australian.dev.nerds
I need some time to investigation.

1 Like

@australian.dev.nerds
Some questions:
1.How you use Aspose.Email dll - from file or NuGet?
2.Which version of framework you use in vs 2022?

@australian.dev.nerds
Please try the following steps:
1.Create a new project from scratch.
2.Add a reference to Aspose.Email from Nuget.
3.Implement the code.
4.Try to compile.
If all else fails, archive the project and send it to us.

Hello there
Can you please be so kind and pull the info if the feature is approved and about its priority?
IMO I think it’s a must have to be able to sign messages for email components, as agreed, converting to/from MailMessage is useless as will remove all the MAPI properties so is destructive.
Thank you :slight_smile:

Hello,

We will inform you about it within 2-3 days.

@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-41221

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.

1 Like

Thanks a thousand times, awesome feature to have :slight_smile:

You are welcome.

1 Like

Hello,
Is this already added? :slight_smile:

Hello,

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.");
}
1 Like

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)

emlx.zip (16.6 KB)

Hello,

We’ll look into it and get back to you.

@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.

1 Like

@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

Hello,

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.

1 Like

Thank you very much for the valuable work.

Please be kind and advise your comment on this overload?

msg.AttachSignature( Cert As X509Certificate2 , Detached As Boolean , Hash Algorithm As String )

Hash Algorithm As String to accept SHA1 SHA256 SHA384 SHA512 … or have an Enum for signing hash algorithm…

It seems you’re asking about an alternative for the current AttachSignature methods. This approach provides flexibility, so we will consider this enhancement.

1 Like

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.

Hello,

This ticket is related to invalid emlx signing.