I know this is an old post but I've just signed up for Azure and I get 25,000 emails a month for free via SendGrid. These instructions are excellent, I was up and running in minutes:
How to Send Email Using SendGrid with Azure
Answer from David Conlisk on Stack OverflowAzure customers can unlock 25,000 free emails each month.
Videos
I know this is an old post but I've just signed up for Azure and I get 25,000 emails a month for free via SendGrid. These instructions are excellent, I was up and running in minutes:
How to Send Email Using SendGrid with Azure
Azure customers can unlock 25,000 free emails each month.
I would never recommend SendGrid. I took up their free account offer and never managed to send a single email - all got blocked - I spent days trying to resolve it. When I enquired why they got blocked, they told me that free accounts share an ip address and if any account abuses that ip by sending spam - then everyone on the shared ip address gets blocked - totally useless. Also if you use them - do not store your email key in a git public repository as anyone can read the key from there (using a crawler) and use your chargeable account to send bulk emails.
A free email service which I've been using reliably with an Azure website is to use my Gmail (Google mail) account. That account has an option for using it with applications - once you enable that, then email can be sent from your azure website. Pasting in sample send code as the port to use (587) is not obvious.
public static void SendMail(MailMessage Message)
{
SmtpClient client = new SmtpClient();
client.Host = EnvironmentSecret.Instance.SmtpHost; // smtp.googlemail.com
client.Port = 587;
client.UseDefaultCredentials = false;
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.EnableSsl = true;
client.Credentials = new NetworkCredential(
EnvironmentSecret.Instance.NetworkCredentialUserName,
EnvironmentSecret.Instance.NetworkCredentialPassword);
client.Send(Message);
}
UPDATE: Google no longer let you use your google account name and password for sending e-mail. Instead you need to now switch on 2-factor authentication and create an app password and use that password in your app with your google account. Here is a step by step guide: youtube.com/watch?v=Y_u5KIeXiVI
I've got some functionality for a project that needs to programmatically receive email. In AWS I usually accomplish this with the email ingestion/receiving features of SES that can trigger lambda functions.
However, I have not found anything close to that natively in Azure. The best I can do is set up a singular 365 inbox, have a Logic App check it for new mail every few minutes, and then call one of my API endpoints with info about the email. This approach wont work long term for me because I"ll need to receive events for any emails sent to a domain for which I have configured MX+DKIM/SPF, not only ones for which I have set up and have access to a physical mailbox.
Am I missing something, or am I just out of luck re Azure native services for this?
My site has a contact us page - I used to send email via outlook but apparently outlook.com has blocked sending email from Azure. What inexpensive alternatives are available?