Jaa


Sending E-Mail from Windows Azure

Many custom-developed applications need to send email, whether it is a part of the registration process, a way of notifying users when important events occur or something else.  If you're a .NET developer you've probably used classes of the System.Web.Mail namespace to accomplish this.  However these classes require access to an SMTP e-mail server to send messages and Windows Azure does not currently provide such a capability.  However all is not lost.  This two-part series describes some patterns for enabling emailing capabilities for applications deployed to the Windows Azure platform.

  1. Using a custom on-premise Email Forwarder Service: This pattern, described in this post, utilizes an on-premise email server to send emails on behalf of the application running on Windows Azure.This is accomplished by creating a custom service using a distributed asynchronous model that uses Windows Azure storage queues and blobs to deliver emails generated in Windows Azure to the an on-premise email server.

Link for Part 1: https://blogs.msdn.com/b/windowsazure/archive/2010/10/08/adoption-program-insights-sending-emails-from-windows-azure-part-1-of-2.aspx 

Part 2 of 2 will include:

  1. Using Email Server's Web Services APIs:  This pattern, that will be described in Part 2, uses the web services API provided by Microsoft Exchange to send email directly from Windows Azure. This pattern can be applied to other messaging products that provide a similar web services interface.
  2. Using a third party SMTP Service: This pattern, described in Steve Marx's blog post Email The Internet.com:Sending and Receiving Email in Windows Azure  utilizes a 3rd party Email service like SendGrid or AuthSMTP to relay emails. The solution described in this post goes one step further and also shows how to receive email from a Windows Azure application by listening for SMTP traffic on port25.

Link for Part 2: https://blogs.msdn.com/b/windowsazure/archive/2010/10/15/adoption-program-insights-sending-emails-from-windows-azure-part-2-of-2.aspx

Enjoy,

Patrick