【发布时间】:2013-07-19 21:09:38
【问题描述】:
我一直在尝试在我的 Azure 网站中设置 Elmah 电子邮件,但没有成功。我可以使用 GMail 或 Hotmail SMTP 设置在我的本地主机上运行它。但是,当部署到我的 azure 网站时,它不起作用。我的异常在本地和生产中都正确记录。只有电子邮件失败(或者网络甚至尝试发送,我一直无法追踪错误或异常)
这可以在 Azure 网站中设置吗?
我的 elmah 电子邮件设置:
<errorMail
from="somehotmailaccount@hotmail.com"
to="somehotmailaccount@hotmail.com"
subject="Error"
async="true"
useSsl="true"
enablessl="true"
port="0" />
我的 Smtp 邮件设置:
<smtp from="somehotmailaccount@hotmail.com">
<network enableSsl="true" host="smtp.live.com" port="25" userName="somehotmailaccount@hotmail.com" password="somepassword" />
</smtp>
非常感谢!
【问题讨论】:
-
不确定我是否正确。 Azure 不提供 SMTP,您需要像 SendGrid 这样的邮件服务来发送电子邮件。
标签: azure smtp elmah azure-web-app-service