smsohan/MvcMailer — Issue #31: Missing SMTP host exception despite using SpecifiedPickupDirectory
Author: JustinStolle
Created: 2011-12-03 23:06:02+00:00
State: open

When using SpecifiedPickupDirectory as the deliveryMethod in Web.config for testing (rather than Network with a host value), an InvalidOperationException is thrown with the message "The SMTP host was not specified."

at System.Net.Mail.SmtpClient.CheckHostAndPort()
at System.Net.Mail.SmtpClient.get_ServicePoint()
at System.Net.Mail.SmtpClient.Dispose(Boolean disposing)
at System.Net.Mail.SmtpClient.Dispose()
at Mvc.Mailer.SmtpClientWrapper.Send(MailMessage mailMessage)
at Mvc.Mailer.MailMessageExtensions.Send(MailMessage message, ISmtpClient smtpClient)
at MySite.Controllers.UsersController.ResetPassword(String userName)