如何使用asp.net C#发送电子邮件

问题描述:

我需要帮助发送使用asp.net的电子邮件,因为电子邮件会发送到所有邮件帐户,除了有gmail帐户的人。

I need help with sending emails using asp.net because the emails get sent to all mailing accounts except to people with gmail accounts.

这真的取决于你打算用什么,什么样的邮件服务器。使用.NET FCL,一切都准备好使用某些SMTP服务器发送邮件:

http:// en。 wikipedia.org/wiki/SMTP [ ^ ],

http: //msdn.microsoft.com/en-us/library/system.net.mail.smtpclient%28v=vs.110%29.aspx [ ^ ],

http://msdn.microsoft。 com / en-us / library / system.net.mail.mailmessage%28v = vs.110%29.aspx [ ^ ]。



如果你必须使用别的东西,你可以轻松我找到一些质量合理的第三方图书馆。



-SA
It really depends on what are you going to use, what kind of mail server. With .NET FCL, everything is ready for sending mail using some SMTP server:
http://en.wikipedia.org/wiki/SMTP[^],
http://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient%28v=vs.110%29.aspx[^],
http://msdn.microsoft.com/en-us/library/system.net.mail.mailmessage%28v=vs.110%29.aspx[^].

If you have to use something else, you can easily find some 3-rd party libraries of reasonable quality.

—SA