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" wrote in message news:%23Pnj2vqDJHA.4724@TK2MSFTNGP05.phx.gbl... > 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. -- Anthony Jones - MVP ASP/ASP.NET
Thanks Anthony! "Anthony Jones" wrote in message news:u108V5zDJHA.4588@TK2MSFTNGP06.phx.gbl... > "Cirene" wrote in message > news:%23Pnj2vqDJHA.4724@TK2MSFTNGP05.phx.gbl... >> 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. > > -- > Anthony Jones - MVP ASP/ASP.NET >