Sending Mail in Azure

K. Kong 126 Reputation points
2023-10-02T08:19:28.81+00:00

I was full of hope when I saw Azure Email Communication Service. But when I read more, https://learn.microsoft.com/en-us/azure/communication-services/concepts/email/sdk-features, I am not sure if I believe what I read.

Azure Email Communication Service does not have the time-tested simple SMTP interface, where virtually every application framework already has the well tested libraries to connect. A Microsoft private mail API has to be used. Am I understanding it correctly?

It would mean that I can't simply move my Node app from AWS to Azure and start running it straightaway by just updating the SMTP server and credentials.

Does Azure offer a standard SMTP server somewhere among its suite of services?

PS: There are good reasons why the SMTP server should be from the same cloud provider of an application. There will be no extra external traffic charges, and cloud providers usually offer free or generous STMP service for applications hosted in the same network. And if my organization's email is already on Microsoft 365, there is no need set up additional SPF/DKIM just for an application. And I don't have to maintain a separate financial relationship with another provider in addition to the one for the application.

Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
704 questions
{count} votes

5 additional answers

Sort by: Most helpful
  1. John Moura 80 Reputation points
    2024-02-22T03:17:37.3166667+00:00
    1 person found this answer helpful.
    0 comments No comments

  2. Gerhard Hudson 0 Reputation points
    2023-10-02T08:32:13.67+00:00

    As of my last knowledge, Microsoft Azure does not offer a standard SMTP server as part of its suite of services. Azure primarily provides infrastructure and platform services for cloud applications, and while it offers a wide range of services, including Azure Functions, Azure Logic Apps, and Azure SendGrid, these are not equivalent to a standard SMTP server.

    Azure SendGrid is an email delivery service that can be used to send transactional and marketing emails from your applications, but it's not a traditional SMTP server. It provides APIs and SMTP relay capabilities for sending emails, but it's a separate service that you would need to integrate with your applications.

    The Azure Email Communication Service you mentioned appears to be a service for sending emails via the Azure Communication Services SDK, which may not offer the standard SMTP interface you are looking for. You would indeed need to use Microsoft's private mail API for this purpose.

    You are correct in noting that using a cloud provider's SMTP service can have advantages, such as avoiding external traffic charges, leveraging existing SPF/DKIM settings if your organization is already using Microsoft 365, and simplifying billing and integration if you're already using Azure for other services.

    However, if you specifically require a standard SMTP server interface, you may need to explore third-party email services or set up your own SMTP server infrastructure within Azure Virtual Machines or other suitable Azure services.


  3. Jonathan Neerup-Andersen 0 Reputation points
    2023-10-02T10:05:25.75+00:00

    As Gerhard mentioned there is no proper Azure SMTP service. However Azure Sendgrid is a good solution to accomplish SMTP from the cloud. Although you might not want to use the API setup from Sendgrid,

    you could set up an SMTP relay to send mails through SendGrid. A solution could be to set up a server running Windows SMTP and then use that as a proxy for SendGrid. They have a guide for this here: https://docs.sendgrid.com/for-developers/sending-email/iis75

    The advantages of using such a service is primarily DKIM/DMARC/SPF where you add extra security and you do not risk getting your mail server blocked.

    Sendgrid works just great and if using the Azure Saas version the billing would be going through your Azure Subscription.

    0 comments No comments

  4. K. Kong 126 Reputation points
    2024-02-22T09:34:34.58+00:00

    @John Moura Interesting. To get the credentials needs something like a PhD in Microsoft Entra with a sub-specialization in Permissions. I don't see how the 200-character user id and 80-character password is more secure as anyone presenting these will still be able to send mail. Because nobody can remember them, they are bound to be stored in a config file somewhere.

    0 comments No comments