简体   繁体   中英

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.

After using the namespace : System.Net.Mail.SmtpClient , I receive an exception :

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:

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:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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