开发者

Debug mode only works sending email in C#

i wrote a sending email function that only works on my debug mode(debug local server) when i publishing and hosting C# code that function doesn't work. This is my email configuration function

<configuration>
    <system.net>
        <mailSettings>
            <smtp from="admin@XXXX.com">
                <network host="smtp.XXXXX.com" port="25"
                         userName="admin@XXXXX.com" password="XXX开发者_如何学GoXX" />
            </smtp>
        </mailSettings>
    </system.net>
    <appSettings/>
    <connectionStrings/>
    <system.web>


I have found a lot of times that there can be a firewall or antivirus (with built in firewall) blocking outgoing smtp traffic. You may also want to check with the network administrator that the mail server will allow smtp traffic from the server you are sending from.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜