简体   繁体   English

如何从 azure 应用服务 webapp 发送一封电子邮件

[英]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).我想从 Azure 应用服务(ASP.Net C# 应用程序)发送自动电子邮件。

Is there an SMTP server provided by azure ?是否有 azure 提供的 SMTP 服务器?

Thanks谢谢

If you need to send a custom email from your code, you'll need to use a third party authenticated relay service like SendGrid.如果您需要通过代码发送自定义电子邮件,则需要使用经过第三方验证的中继服务,例如 SendGrid。 Outbound SMTP is restricted in Azure. Azure 中限制出站 SMTP。

There are also other approaches that leverage Azure Logic Apps for example to use built-in connectors that send from Outlook or Gmail.还有其他方法可以利用 Azure 逻辑应用程序,例如使用从 Outlook 或 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.如果“自动电子邮件”与您的应用程序发生的事情有关,您或许可以使用基于 Azure 活动日志的触发警报规则 For example, sending an email every time your app restarts.例如,每次您的应用程序重新启动时发送一封电子邮件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM