I do not have access to an IIS development server — only the production one. So, for my development, I have to use the ASP.NET Development Server thats built into Visual Studio. I get Failure to send message when I have the SMTP client configured this way.
SmtpClient.Host = 'localhost'; SmtpClient.DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory; SmtpClient.PickupDirectoryLocation = HttpContext.Current.Server.MapPath('~/MessagesSent/');
Is there any way I can use the Development server to drop off messages so I can test them?
Edit: Or is there another way I can test sending an e-mail on the Development Server?
My
~/MessagesSent/did not exist. That was the problem.