【Azure Logic App】在Azure Logic App中使用SMTP发送邮件示例

问题描述

在Azure Logic App的官网介绍中,使用SMTP组件发送邮件非常简单(https://docs.azure.cn/zh-cn/connectors/connectors-create-api-smtp#connect-to-smtp)。

本文通过实际操作,配置SMTP,然后设置Email内容,最后触发Logic App并验证是否接受到邮件。


image.png

问题解答

第一步:准备SMTP信息

本文以outlook.com个人账号为例,通过链接 (获取Outlook的SMTP信息:https://outlook.live.com/owa/?auth=1&path=/options/popandimap

image.png

Outlook.com的SMTP信息为:

Server name: smtp.office365.com

Port: 587 

Encryption method: STARTTLS

第二步:在Logic App 的SMTP 组件中配置SMTP 和邮件内容

选择SMTP --> Send Email (V3)

数据SMTP信息以及个人邮箱,密码

选择 To, Subject, Body,然后输入相应的模板内容


image.png

保存后,在Workflow的Overview页面中,获取触发Logic App的URL,发送POST请求验证。

完成示例如动图:

logic App send email.gif

参考资料

从 Azure 逻辑应用连接到 SMTP 帐户 : https://docs.azure.cn/zh-cn/connectors/connectors-create-api-smtp#connect-to-smtp

smpt server ID and port # for live.com email account : https://answers.microsoft.com/en-us/outlook_com/forum/all/smpt-server-id-and-port-for-livecom-email-account/4d47d92b-494c-4f64-afd7-4c70f67e46d1

Setting up Outlook.com is simple as long as you know the POP3 and SMTP Settings. Listed below are the server settings that you are looking for:

  • IMAP server name imap-mail.outlook.com
  • **IMAP port **993
  • **IMAP encryption method **TLS
  • POP server name pop-mail.outlook.com
  • POP port 995
  • POP encryption method TLS
  • SMTP server name smtp-mail.outlook.com
  • SMTP port 587
  • SMTP encryption method STARTTLS

You can also see this information once you log in at https://outlook.live.com/owa/?auth=1&path=/options/popandimap

If you need clarifications, feel free to message us again.


当在复杂的环境中面临问题,格物之道需:浊而静之徐清,安以动之徐生。 云中,恰是如此!

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容