andrewdavey / postal

Email sending for asp.net mvc using the view engine system to render emails.
http://aboutcode.net/postal
MIT License
536 stars 168 forks source link

If MAIL FROM is local then you must authenticate #127

Closed ImranAhmed closed 9 years ago

ImranAhmed commented 9 years ago

Hi,

Great library. This has been working for some time in PROD without any issues however I've just started getting this error. Has anyone come across this before?

System.Net.Mail.SmtpException: Mailbox unavailable. The server response was: If MAIL FROM is local then you must authenticate at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response) at System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[] command, MailAddress from, Boolean allowUnicode) at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, Boolean allowUnicode, SmtpFailedRecipientException& exception) at System.Net.Mail.SmtpClient.Send(MailMessage message) at Postal.EmailService.Send(Email email) at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1)

ImranAhmed commented 9 years ago

ok, fixed it, looks like my mail server settings changed. I had to authenticate using username/password and create an smtp client.