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

简介: 【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并验证是否接受到邮件。

 

问题解答

第一步:准备SMTP信息

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

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,然后输入相应的模板内容

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

 

完成示例如动图:

 

参考资料

从 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.

相关文章
|
6月前
|
Java 应用服务中间件 API
【App Service】部署War包到Azure云上遇404错误
Java应用部署至Azure App Service for Windows后报404,本地运行正常。经排查,日志提示类文件版本不兼容:应用由Java 17(class file version 61.0)编译,但环境仅支持到Java 11(55.0)。错误根源为Java版本不匹配。调整App Service的Java版本至17后问题解决,成功访问接口。
572 3
|
6月前
|
存储 Linux 网络安全
【Azure App Service】Root CA on App Service
Azure App Service for Windows应用连接外部SSL服务时,需确保其证书由受信任的根CA颁发。多租户环境下无法修改根证书,但ASE(单租户)可加载自定义CA证书。若遇证书信任问题,可更换为公共CA证书或将应用部署于ASE并导入私有CA证书。通过Kudu的PowerShell(Windows)或SSH(Linux)可查看当前受信任的根证书列表。
150 13
|
7月前
|
API 网络架构 容器
【Azure Container App】查看当前 Container App Environment 中的 CPU 使用情况的API
在扩展 Azure Container Apps 副本时,因 Container App Environment 的 CPU 核心数已达上限(500 cores),导致扩展失败。本文介绍如何使用 `az rest` 命令调用 Azure China Cloud 管理 API,查询当前环境的 CPU 使用情况,并提供具体操作步骤及示例。
266 17
|
7月前
|
数据安全/隐私保护
【Azure Function App】PowerShell Function 执行 Get-AzAccessToken 的返回值类型问题:System.String 与 System.Security.SecureString
将PowerShell Function部署到Azure Function App后,Get-AzAccessToken返回值类型在不同环境中有差异。正常为SecureString类型,但部分情况下为System.String类型,导致后续处理出错。解决方法是在profile.ps1中设置环境变量$env:AZUREPS_OUTPUT_PLAINTEXT_AZACCESSTOKEN=false,以禁用明文输出。
203 0
|
Ruby
|
数据安全/隐私保护 Ruby
|
数据安全/隐私保护 Ruby
|
网络安全 数据安全/隐私保护
用smtp发送邮件,语法错误,无法识别命令。 服务器响应为:Authentication is re
用smtp发送邮件,语法错误,无法识别命令。 服务器响应为:Authentication is re
929 0
|
Python
python使用smtp发送邮件
python使用smtp发送邮件
332 0
|
网络安全 数据安全/隐私保护 Python
Python SMTP发送邮件
Python SMTP发送邮件