在Microsoft Windows Azure中部署时使用smtp发送的邮件无法正常工作c#asp.net mvc5 [英] Sent mail using smtp not working when deployed in microsoft windows azure c# asp.net mvc5

查看:102
本文介绍了在Microsoft Windows Azure中部署时使用smtp发送的邮件无法正常工作c#asp.net mvc5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直没有尝试在我的Azure网站中收到电子邮件.我可以使用GMail SMTP设置在我的本地主机上运行它.但是,当部署到我的Windows Azure网站上时,即使在我的本地主机IIS上也无法正常工作.没有邮件被发送或接收! web.config中有我的代码:

I've been trying unsuccessfully to get an email in my Azure Website. I can get it working on my localhost using either the GMail SMTP settings. However when deployed to my windows azure website ,even on my localhost IIS it doesn't work. none mail being sent or received!!! there is my code in web.config:

<appSettings>
        <add key="webpages:Version" value="3.0.0.0" />
        <add key="webpages:Enabled" value="false" />
        <add key="ClientValidationEnabled" value="true" />
        <add key="UnobtrusiveJavaScriptEnabled" value="true" />
        <add key="Smtp_Server" value="smtp.gmail.com" />
        <add key="Smtp_Port" value="587" />
        <add key="Smtp_UserName" value="*****" />
        <add key="Smtp_Password" value="***" />
        <add key="Smtp_bSSLConnection" value="True" />
        <add key="ActiveSendMail" value="False" />
        <add key="SecurityKey" value="****" />
      </appSettings>

在搜索时,我发现一个链接,告诉我"Azure不支持SMTP: http://www.postseek.com/meta/488719217d716a4fc35c7d6f336e263c 我想知道这是正确的吗? 我会使用其他已发送邮件的服务器吗?

When i was searching i found a link that told me that "SMTP is not supported by Azure : http://www.postseek.com/meta/488719217d716a4fc35c7d6f336e263c" I want to know is that correct?? Would i use another sent mail server?

推荐答案

可能不支持SMTP.

您可以为我们 Mandrill 提供一个API,您可以使用该API发送适用于http的电子邮件,因此您不必不必担心smtp.

You could us Mandrill they have an api that you can use to send email that works over http, so you don't need to worry about smtp.

这篇关于在Microsoft Windows Azure中部署时使用smtp发送的邮件无法正常工作c#asp.net mvc5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆