简体   繁体   English

如何使用VB.NET 2010通过SMTP发送电子邮件

[英]How to send email via smtp using VB.NET 2010

I need to send an email via SMTP, I have my SMTP in a Linux Centos Server, and I created the software to send emails with VB.NET 2010. 我需要通过SMTP发送电子邮件,我的SMTP在Linux Centos服务器中,并且我创建了使用VB.NET 2010发送电子邮件的软件。

After using the namespace : System.Net.Mail.SmtpClient , I receive an exception : 使用namespaceSystem.Net.Mail.SmtpClient ,我收到一个异常:

Mailbox name not allowed.
The server response was: sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)

Thanks in advance. 提前致谢。

That's an error from the server you're attempting to send the email to; 您尝试将电子邮件发送到的服务器出现错误; it has nothing to do with your code. 它与您的代码无关。 The server you're trying to send the email too probably isn't authoritative for the mail domain you're sending to. 您尝试发送电子邮件的服务器对于您要发送到的邮件域也可能没有权威。

To get free code for sending mails through smtp, visit the below mentioned site: 要获取通过smtp发送邮件的免费代码,请访问下面提到的网站:

http://bitsbyta.blogspot.com/2011/02/how-to-send-emails-through-smtp-vbnet.html http://bitsbyta.blogspot.com/2011/02/how-to-send-emails-through-smtp-vbnet.html

for more tutorials on vb.net,c#.net, C++ and java visit: 有关vb.net,c#.net,C ++和Java的更多教程,请访问:

http://www.bitsbyta.blogspot.com/ http://www.bitsbyta.blogspot.com/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM