SmtpFailedRecipientsException error

  • Thread starter Thread starter Cirene
  • Start date Start date
C

Cirene

When I test out my web app using my smtp server it works fine. When I put
my clients smtp server info (SMTP server and FROM address) I get this error
when trying to email from the web app. Any ideas?


System.Net.Mail.SmtpFailedRecipientsException: Unable to send to all
recipients. ---> System.Net.Mail.SmtpFailedRecipientException: Mailbox
unavailable. The server response was: 5.7.1 ... Relaying denied --- End of
inner exception stack trace --- at
System.Net.Mail.SmtpTransport.SendMail(MailAddress sender,
MailAddressCollection recipients, String deliveryNotify,
SmtpFailedRecipientException& exception) at
System.Net.Mail.SmtpClient.Send(MailMessage message) at
test.SendEmail(Boolean bFullPlanOrder) in
C:\inetpub\wwwroot\email\test.aspx.vb:line 32



Lin 32 is a simple smtp.Send(mymessage).
 
Cirene said:
When I test out my web app using my smtp server it works fine. When I put
my clients smtp server info (SMTP server and FROM address) I get this
error when trying to email from the web app. Any ideas?


System.Net.Mail.SmtpFailedRecipientsException: Unable to send to all
recipients. ---> System.Net.Mail.SmtpFailedRecipientException: Mailbox
unavailable. The server response was: 5.7.1 ... Relaying denied --- End of
inner exception stack trace --- at
System.Net.Mail.SmtpTransport.SendMail(MailAddress sender,
MailAddressCollection recipients, String deliveryNotify,
SmtpFailedRecipientException& exception) at
System.Net.Mail.SmtpClient.Send(MailMessage message) at
test.SendEmail(Boolean bFullPlanOrder) in
C:\inetpub\wwwroot\email\test.aspx.vb:line 32



Lin 32 is a simple smtp.Send(mymessage).

To prevent spambots from using infected machine to send zillions of emails
through a SMTP server the range of IP addresses that can relay through an
SMTP server is restricted. The SMTP server that you are pointing your code
at needs to allow relay from the IP address that it sees for the Web server
running this code.
 
Thanks Anthony!

Anthony Jones said:
To prevent spambots from using infected machine to send zillions of emails
through a SMTP server the range of IP addresses that can relay through an
SMTP server is restricted. The SMTP server that you are pointing your
code at needs to allow relay from the IP address that it sees for the Web
server running this code.
 
Back
Top