Bob5421
Bob5421

Reputation: 9073

How send a single email from an azure app service webapp

I want to send an automatic email from an Azure App Service (ASP.Net C# application).

Is there an SMTP server provided by azure ?

Thanks

Upvotes: 1

Views: 8223

Answers (2)

Matthew Kooshad
Matthew Kooshad

Reputation: 319

presently, i think the answer you're looking for is to use [in Azure] Microsoft's Email Communication Services.

here's a Quickstart: Create and manage Email Communication Service resources Article from 05/23/2024: https://learn.microsoft.com/en-us/azure/communication-services/quickstarts/email/create-email-communication-resource?pivots=platform-azp

one limitation of using an Azure Logic App, per the other answer i see here, is that presently you cannot specify a From Name. it will show to the recipient the from email address only, which i think aesthetically is an unnecessary limit to have.

Upvotes: 0

Noah Stahl
Noah Stahl

Reputation: 7553

If you need to send a custom email from your code, you'll need to use a third party authenticated relay service like SendGrid. Outbound SMTP is restricted in Azure.

There are also other approaches that leverage Azure Logic Apps for example to use built-in connectors that send from Outlook or Gmail. Search will reveal tutorials.

If "automatic email" relates to something happening with your app, you might be able to use a triggered alert rule based on Azure activity logs. For example, sending an email every time your app restarts.

Upvotes: 4

Related Questions