A question popped up today about sending emails from within the Windows Azure environment, specifically using SmtpClient.
So, to cover off some basics:
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:
The code is here:
And the app is deployed here: