PDA

View Full Version : Sending Emails via Visual Studio


rodmjay
06-08-2006, 09:18 AM
I am trying to send an email to a user. How do i go about doing this.

Here is the code I am currently trying

Dim smtpClient As New SmtpClient('mail.mydomain.biz')
Dim msg As New MailMessage(txtFrom.Text, 'rodmjay@mydomain.com', txtSubject.Text, txtMessage.Text)
smtpClient.Send(msg)


Here is the error response i am getting

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


Anyone who has done this let me know and the code they used

mjp
06-08-2006, 09:23 AM
You have .com and .biz in the code you quoted- is one of them incorrect?

mjp
DiscountASP.NET
http://www.DiscountASP.NET

joelnet
06-08-2006, 09:34 AM
If you are trying to send locally, check your ISP for your ISP's SMTP server and use that.

If you are trying to send mail on discountasp.net, use localhost.

If you are trying to send mail on another ISP, contact them for the proper SMTP server.


Joel Thoms
DiscountASP.NET
http://www.DiscountASP.NET