Hi all,
I have a unit test that attempts to send an email using the settings in my app.config in my unit test project.
It works just fine on my developer machine, but the SmtpClient instance is not configured at all when running on my build server.
Below is the code under test. Both client.Host and .Port is unconfigured on server.
Any suggestions welcomed!
Cheers, Anders, Denmark
public class SmtpMailSenderService : IMailSenderService
{
public void SendMail(MailMessage message)
{
var client = new SmtpClient();
Debug.WriteLine(client.Host);
Debug.WriteLine(client.Port);
client.Send(message);
}
}