PDA

View Full Version : SmtpFailedRecipientException: Mailbox unavailable


Pranay
06-22-2010, 07:46 AM
I am using asp.net password recovery page and its failing when comes to emailing.
this is the error I get : SmtpFailedRecipientException: Mailbox unavailable
this is my webconfig settings
<system.net>
<mailSettings>
<smtp from="XXXX@XXXX.com" >
<network host="smtp.xxxx.com" password="xxxxxx" userName="XXXX" defaultCredentials="false" />
</smtp>
</mailSettings>

Please help me with this.
The page is working fine locally but fails on discountasp.net server, its this web config page problem only because I am able to email from my application when I am using my own emailing code.
Thanks

wisemx
06-22-2010, 08:07 AM
Hi,
Try like this:
<system.net>
<mailSettings>
<smtp from="XXXX@XXXX.com" deliveryMethod="Network">
<network host="localhost" port="25" password="xxxxxx" userName="vailiduser@yourdomain.com" />
</smtp>
</mailSettings>
</system.net>

Pranay
06-22-2010, 08:17 AM
Thank you , awesome it worked !!! but I have a question ...how is it working for "Localhost" when I am using a remote server smtp.xxxx.com
Thanks again
Pranay

bruce
06-22-2010, 10:57 AM
when you set the smtp server to localhost, message will be relay out from the smtp service on the server.