Sending Automatic Email

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an online app via webforms. When the user completes the final step...I would like the app to automatically send an email to a specific individual. I'm using the following code:

Imports System.Web.Mail
....
Dim Mail As New MailMessage
Mail.To = "(e-mail address removed)"
Mail.Subject = "Howdy"
Mail.From = "(e-mail address removed)"
SmtpMail.SmtpServer = "localhost"
SmtpMail.Send(Mail)

I get this Error Message:
The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for (e-mail address removed)

Any ideas how to fix this?

Thanks
 
I would check to make sure in IIS under Default SMTP Virtual
Server->Properites->Access->Relay that you have added 127.0.0.1 to that
list. (I don't believe this was necessary with Win2K Pro, but is with XP
Pro)

HTH,
Greg
 
Back
Top