SmtpFailedRecipientsException error

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).
 
A

Anthony Jones

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.
 
C

Cirene

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top