Email Encryption & Decryption using C#

Suresh Rajamani 1 Reputation point
2021-03-24T02:40:02.24+00:00

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

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,234 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Daniel Zhang-MSFT 9,611 Reputation points
    2021-03-25T01:42:37.003+00:00

    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.

    0 comments No comments