Windows Azure - Sending SMTP Emails!

Published 08 January 09 12:52 PM | davidlem 

A question popped up today about sending emails from within the Windows Azure environment, specifically using SmtpClient.

So, to cover off some basics:

  1. The Windows Azure environment itself does not currently provide a SMTP relay or mail relay service
  2. .NET applications run under a variation of the standard ASP.NET medium trust policy called Windows Azure Trust policy
  3. Port 25 is open (well, all ports are open actually) to outbound traffic for Windows Azure applications

As we don't provide a host for sending or relaying SMTP mail messages, you'll need to find one that will. Your ISP or free mail provider will do providing they are setup to enable SMTP relaying.

Next, there is an issue with using the SmtpClient class with its Port property set to something other than 25 and its trust election, see this forum thread:

So to demo this, I whipped up a quick sample app that sends STMP emails through a relay host as a web role:

image

The code is here:

And the app is deployed here:

Enjoy :)

Comments

# Windows Azure - Sending SMTP Emails! | Coded Style said on January 7, 2009 10:08 PM:

PingBack from http://www.codedstyle.com/windows-azure-sending-smtp-emails/

New Comments to this post are disabled

Search

This Blog

Tags

No tags have been created or used yet.

Other Sites

Syndication

Page view tracker