send email C# using smtp server with username password authentification

百般思念 提交于 2019-12-06 08:29:27
|improve this question
ridoy

I don't think you want to set

mailclient.UseDefaultCredentials = true;

Read more about this option here.


You should also test that you can actually send email through that smtp server.

Try connecting via telnet and authorizing. There are also plenty of services that will let you send a test message online (http://pingability.com/smtptest.jsp for example).

maybe you need to Add mailclient.EnableSsl = true;

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!