Signing and encrypting emails with attachment

M

Mathew Coleman

Hi All,



I would like to send emails through an application. Body and attachment have
to be encrypted as well as digitally signed.



I could able to sign it and send when it does not contain an attachment.
Once I attached something someone can see the attachment even without proper
certificate installed. Also body of the email gets disappeared in the same
time.



I am using .NET 2.0 and C#. Namespaces I am using are

using System.Net.Mail;

using System.Security.Cryptography.X509Certificates;

using System.Security.Cryptography.Pkcs;



Could some one help me with this please?



Thanks

Matt
 
F

Frédéric Queudret

Hi,

Mail encryption is not supported in System.Net.Mail.
You can use encryption at transportation level using the EnableSsl property
on SmtpClient.
ref:
http://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.enablessl.aspx

If .NET 3.0 is possible for you, you may consider to use WCF and a message
security method (or extend the programming model to implement what you want
to do)
ref: http://msdn.microsoft.com/en-us/library/bb397811.aspx

If .NET 2.0 is the only one you can use, you may consider to implement your
own security mecanism (embed your mail as an encrypted attachment, ...).

Frédéric Queudret
CTO MPOWARE
http://www.mpoware.com/
 
M

Mathew Coleman

Hi Frédéric,



Thanks a lot for your prompt reply.



..NET 3.0 is not possible for this scenario. As you have suggested I tried
the 3rd option earlier. There was a problem with that. In my case I want
sign the mail as well. Once I attached something the body and the signed
part is being disappeared. As you suggested I can encrypt the email as
encrypted attachment, but I cannot avoid disappearing of the body soon after
I add the attachment. I appreciate your help on this.



Thanks and regards

Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top