0

我正在尝试创建一个简单的 hello world 逻辑应用程序,它可以给自己发送电子邮件。

我添加了 SMTP 连接器,并为 Google 填写了以下属性:

  服务器:smtp.google.com

  端口:465(587 也尝试失败)

  用户帐号:xtenxxx@gmail.com

  密码:xpassxx

  SSL:真

然后,一旦创建了 API,我就使用了:

  至:xtenxxx@gmail.com

  主题:测试

  身体:测试

我手动运行它并收到此错误:

  {"code":"BadRequest","message":"Http 请求失败:已超时。"}

我可以毫无问题地使用其他连接器,例如 Twitter 和 Dropbox。所以我假设它必须是我输入的 API 参数。

任何指导将不胜感激。谢谢

编辑添加 CodeView:

{ "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2014-12-01-preview/workflowdefinition.json#", "contentVersion": "1.0.0.0", "parameters": { "/subscriptions/49c83dfe-f987-4e2e-8b23-c6ceb2c4855e/resourceGroups/Default-Web-EastUS/providers/Microsoft.AppService/apiApps/SMTPConnector/token": { "type": "String", "defaultValue": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJtc25hbWUiOiJFTUEuUmVzb3VyY2VQcm92aWRlciIsImZ1bGxyb3ciOiJhbGwiLCJkYmciOiJEZWZhdWx0LVdlYi1FYXN0VVM0OWM4M2RmZWY5ODc0ZTJlOGIyM2M2Y2ViMmM0ODU1ZSw1MzE3ODQxNDIiLCJ2ZXIiOiIzIiwidWlkIjoic2lkOjE0MzUwNzU5MjE3MzMiLCJpc3MiOiJ1cm46bWljcm9zb2Z0OndpbmRvd3MtYXp1cmU6enVtbyIsImF1ZCI6InVybjptaWNyb3NvZnQ6d2luZG93cy1henVyZTp6dW1vIiwibmJmIjoxNDM1MDc1OTIyfQ.VK1gtDPgaxaaEhp_9AZYtVR2BD8gLrDaKKcYyFpg_lk", "metadata": { "token": { "name": "/subscriptions/49c83dfe-f987-4e2e-8b23-c6ceb2c4855e/resourcegroups/default-web-eastus/providers/Microsoft.AppService/apiapps/smtpconnector/token" } } }, "/subscriptions/49c83dfe-f987-4e2e-8b23-c6ceb2c4855e/resourcegroups/default-web-eastus/providers/Microsoft.AppService/apiapps/twitterconnector/token": { "defaultValue": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJtc25hbWUiOiJFTUEuUmVzb3VyY2VQcm92aWRlciIsImZ1bGxyb3ciOiJhbGwiLCJkYmciOiJEZWZhdWx0LVdlYi1FYXN0VVM0OWM4M2RmZWY5ODc0ZTJlOGIyM2M2Y2ViMmM0ODU1ZSw1MzE3ODQxNDIiLCJ2ZXIiOiIzIiwidWlkIjoic2lkOjE0MzUwNzYxMDIwMTQiLCJpc3MiOiJ1cm46bWljcm9zb2Z0OndpbmRvd3MtYXp1cmU6enVtbyIsImF1ZCI6InVybjptaWNyb3NvZnQ6d2luZG93cy1henVyZTp6dW1vIiwibmJmIjoxNDM1MDc2MTAzfQ.GSyp45LKqNsN_vi1FQlYBj8h_yAybXQsX8WKSXTcvNc", "type": "String", "metadata": { "token": { "name": "/subscriptions/49c83dfe-f987-4e2e-8b23-c6ceb2c4855e/resourcegroups/default-web-eastus/providers/Microsoft.AppService/apiapps/twitterconnector/token" } } } }, "triggers": { "recurrence": { "type": "Recurrence", "recurrence": { "frequency": "Hour", "interval": 1 } } }, "actions": { "smtpconnector": { "type": "ApiApp", "inputs": { "apiVersion": "2015-01-14", "host": { "id": "/subscriptions/49c83dfe-f987-4e2e-8b23-c6ceb2c4855e/resourcegroups/default-web-eastus/providers/Microsoft.AppService/apiapps/smtpconnector", "gateway": "https://default-web-eastus49c83dfef9874e2e8b23c6ceb2c4855e.azurewebsites.net" }, "operation": "SendEmail", "parameters": { "emailDetails": { "To": "ctenden@gmail.com", "Subject": "Test", "Body": "Test" } }, "authentication": { "type": "Raw", "scheme": "Zumo", "parameter": "@parameters('/subscriptions/49c83dfe-f987-4e2e-8b23-c6ceb2c4855e/resourcegroups/default-web-eastus/providers/Microsoft.AppService/apiapps/smtpconnector/token')" } }, "conditions": [] } }, "outputs": {} }

4

1 回答 1

0

当我使用端口 587 而不是 465 时,这适用于逻辑应用程序上的 gmail.com。

于 2015-06-23T14:58:19.563 回答