A
AA2e72E
I am having some difficulty understanding what is happening here:
..... code snippet
SmtpClient client = new
SmtpClient(ConfigurationManager.AppSettings["Default_mailClient"]);
client.UseDefaultCredentials = true;
if (!Directory.Exists(LogFolder + @"\" + thisEmail.STATIONID))
{
Directory.CreateDirectory(LogFolder + @"\" + thisEmail.STATIONID);
}
client.PickupDirectoryLocation = LogFolder + @"\" + thisEmail.STATIONID;
client.DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory;
MailMessage mailMessage = new MailMessage();
// properties of mailMessage set here e.g From, To, Subject etc
client.Send(mailMessage);
..... after the last statement, I find that an *.eml file is deposited in the
appropriate folder BUT no email is dispatched.
I am missing something; any help in identifying what that is?
Thanks.
..... code snippet
SmtpClient client = new
SmtpClient(ConfigurationManager.AppSettings["Default_mailClient"]);
client.UseDefaultCredentials = true;
if (!Directory.Exists(LogFolder + @"\" + thisEmail.STATIONID))
{
Directory.CreateDirectory(LogFolder + @"\" + thisEmail.STATIONID);
}
client.PickupDirectoryLocation = LogFolder + @"\" + thisEmail.STATIONID;
client.DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory;
MailMessage mailMessage = new MailMessage();
// properties of mailMessage set here e.g From, To, Subject etc
client.Send(mailMessage);
..... after the last statement, I find that an *.eml file is deposited in the
appropriate folder BUT no email is dispatched.
I am missing something; any help in identifying what that is?
Thanks.