How To: Send e-mails from your Windows Azure Virtual Machine (VM) to Office 365 (Exchange)

WindowsAzure

After a few hours of struggling, I found that (for now) the only method of sending e-mails from your SQL Server Instance (inside a Windows Azure Virtual Machine / Environment) is to setup a SMTP-service in IIS 6.0 (Yes I know, but SQL Server doesn’t support the use of ‘TLS encryption‘). Mohamed M Malek posted a step-by-step blogpost which will provide you a grant tour on how to set this up, click here.

I’ve tested this solution in a Windows Azure VM:
Windows Server 2012 Datacenter Edition (from the Virtual Machine Catalog in Windows Azure)
SQL Server 2012 Express Edition

Yes the Express Edition of SQL Server does indeed supports sending mails by using sp_send_dbmail(). More info on how to set that up: click here

Important settings:
Do not fill in any username or password details in Account:
@username=’tanmaya@mydomain.com’,
@password=’1qwe432′,

LocalHost will serve as an SMTP-server for the Account:
@mailserver_name=’localhost’

-> Don’t forget to stop and start the SMTP-service!

The Office 365 version I’m currently using is the ‘Office 365 for professionals and small businesses‘.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s