views:

35

answers:

1

Jeff Atwood has a good post on ways to pass email spam filters in his post at: http://www.codinghorror.com/blog/2010/04/so-youd-like-to-send-some-email-through-code.html

The only issue I have is figuring out a way to sign the email with a private key for DKIM. We use the MailMessage and SmtpClient objects that come with ASP.NET 3.5. How can I sign an email with these objects?

Also, we use the free SMTP Server that comes with Windows 2008 R2. I don't believe there is a way to sign from that server, if there is way I'm open to using that approach.

A: 

Check out this article on how to send dkim signed emails:

http://blog.tinisles.com/2009/09/sending-a-dkim-signed-email-from-c/

You may also want to try some commercial solutions like Mail.dll. It offers sending DKIM messages in few lines of code:

using (RSACryptoServiceProvider rsa = new RSACryptoServiceProvider())
{
   IMail email = Mail
       .Text("text")
       .From("[email protected]")
       .To("[email protected]")
       .Subject("subject")
       .DKIMSign(rsa, "brisbane", "example.com")
       .Create();
}

Please note that Mail.dll is a commercial component I created.

You can download Mail.dll email component here

Pawel Lesnikowski
I'm trying out Mailbee now, but I'll look at your product if that fails.
Josh