Send emails from Windows Azure with SendGrid

by Arra Derderian 24. April 2011 18:51
After moving our website to Windows Azure we had one problem. Well we had a couple, but all of them were resolved pretty simply. The one that lingered was that our Contact Form stopped working. This is because there is no email server used for relay in Azure. Microsoft does this so people cannot send out millions of spam emails from Azure. Needless to say this made it hard to get a simple contact form working. We did not want to expose our hosting server email server to the outside ourselves because we could not verify our Azure server IP would be the same all the time. After searching for some solutions out there the best option seemed to be to use a third party email service like Amazon, SendGrid, or Postmark. Being a small business we knew we didn't want to pay anything to just have our contact form send one or two emails a month. The lowest plan I could find was $9.95/month from SendGrid. This was still too much. I then scrolled to the bottom of the pricing page and found a FREE option! Just scroll to the bottom of the page:


Once I signed up for the free plan it took a few hours for my account to be provisioned. Once that was done I was able to integrate my existing C# code which looked very much like this, C# SMTP example. You can also use the REST protocol but this is much cleaner in my mind. I tried testing the code from my dev environment but I kept getting an error saying the server could not be reached. I then thought maybe I can only access the email server from behind the URL I registered. So I pushed the code to Azure and gave it a whirl. It worked! Voila an email solution that lets you send 200 emails a day for free, and it works from Azure. Hopefully our contact form gets some activity in the coming months!

Tags:

ASP.NET | Azure | Cloud Computing | Engineering | Technology

Comments

11/5/2011 3:20:31 AM #

ryad marrakech

Large enter, I accept website owners should secure a lot from this blog its really user pretty. “You don’t get to deserve your mother’s cherish. You get to deserve your beget’s.” by Robert Blight.

ryad marrakech France | Reply

11/7/2011 2:05:58 AM #

Tout Marrakech

I like what you mans are up moreover. Such funny process besides reporting! Observe up the good processs mans I’ve incorporated you mans to my blogroll. I mull it choose elevate the quality of my point Sourire . “A enclosure is a location where what was indiscriminate prior suits further undetermined than always.” by Henry Waldorf Francis.

Tout Marrakech France | Reply

11/13/2011 12:51:26 AM #

Tout Marrakech

Rattling nice word can be base on blog .

Tout Marrakech France | Reply

11/15/2011 10:12:21 AM #

immobilier a vendre au maroc

Any truly primary informs on this locale, saved to specials .

immobilier a vendre au maroc France | Reply

11/17/2011 1:15:34 PM #

vas 5054a

NBC has ordered a pilot of Bryan Fuller’s remake of the classic TV show The Munsters

vas 5054a Paraguay | Reply

3/29/2012 7:46:57 PM #

Louis Vuitton outlet

<a href="www.bagscloset.com/...tton-c-1.html">Louis Vuitton outlet</a>

<a href="www.bagscloset.com/...tton-c-1.html">Louis Vuitton Bags</a>

<a href="www.bagscloset.com/...tton-c-1.html">Cheap Louis Vuitton</a>

<a href="www.bagscloset.com/...et-c-1_9.html">Louis Vuitton Wallet</a>

<a href="www.bagscloset.com/...et-c-1_9.html">Louis Wallet Discount</a>

<a href="www.bagscloset.com/...1_10_14.html">Damier Azur Canvas Bags</a>

Louis Vuitton outlet People's Republic of China | Reply

Add comment


(Will show your Gravatar icon)

  Country flag

Click to change captcha
biuquote
  • Comment
  • Preview
Loading