Unable to send email on production server with ASP.NET MVC
Posted
by Davide Vosti
on Stack Overflow
See other posts from Stack Overflow
or by Davide Vosti
Published on 2010-04-21T08:20:10Z
Indexed on
2010/04/21
8:23 UTC
Read the original article
Hit count: 407
I have a simple ASP.NET MVC application with a contact page.
In my development machine (local) I can send successfully emails (I specify host and credentials), but on the production server this doesn't work and I get this error:
System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The server response was: Requested action not taken: mailbox unavailable or not local at System.Net.Mail.SmtpTransport.SendMail...
The server is in my LAN (the mail server too). I tried with multiple accounts but I have errors every time.
Credentials for the account are provided at runtime with
smtp.Credentials = new NetworkCredential("username", "password");
Any idea?
Thanks
© Stack Overflow or respective owner