question

sura avatar image
0 Votes"
sura asked DanielZhang-MSFT edited

Email Encryption & Decryption using C#

Team, I want to send a secure encrypted email body & attachment using C#. I have seen some samples for encryption using S/MIME, but how the client will open the encrypted email and attachments from their email client (outlook). Kindly provide solution. Thanks, Suresh Rajamani

dotnet-csharp
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

DanielZhang-MSFT avatar image
0 Votes"
DanielZhang-MSFT answered DanielZhang-MSFT edited

Hi sura,
You can try to use MimeKit to decrypt.
jstedfast provided a simple code example you can refer to.
Meanwhile, you can also try to encrypt a message with its public key, and then decrypt it with the private.
Here is a code example and hope help for you.
Best Regards,
Daniel Zhang


If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.