Digital Signature Email

I have an application that sends customer applications. I have a request for a digital email signature (with pdf attachment) from several clients. I am currently using System.Net.Mail to send email. I cannot find a clear answer, can this be done in .NET or should I look at a third-party component?

+3
source share
3 answers

Check the email component of Mail.dll :

IMail email = Mail.Text("This is message body")
  .Subject("Test")
  .From(new MailBox("mail@in_the_certificate.com", "Alice"))
  .To(new MailBox("bob@mail.com", "Bob"))
  .AddAttachment(@"c:\invoice.pdf")
  .SignWith(new X509Certificate2("TestCertificate.pfx", ""))
  .Create();

using (Smtp smtp = new Smtp())
{
    smtp.Connect("smtp.server.com");
    smtp.Ehlo();
    smtp.Login("user", "password");
    smtp.SendMessage(email);
    smtp.Close();
} 

You can also use the Mail.dll template engine to create a message body.

Disclaimer: Please note that this is a commercial product (at a reasonable price) that I helped create.

0

- . . SecureBlackbox MIMEBlackbox, MIME S/MIME.

0

Checkout the Peter Everett project at CodeProject. I used it before to send encrypted emails and it works great.

-1
source

Source: https://habr.com/ru/post/1783733/


All Articles