Hi,
When using the following code to send an email message to an external e-mail address via IIS6 SMTP I am receiving a message stating that the message has been sent, but it never arrives at the destination. I'm using the System.Net.Mail namespace and the following code:
MailMessage msg = new MailMessage();
msg.From = new MailAddress(from);
foreach (string strTo in to.Split(';'))
{
if (strTo.Replace(";", "") != string.Empty)
msgMailSummary.To.Add(new MailAddress(strTo.Replace(";", "")));
}
msg.Subject = subject;
msg.Body = body;
SmtpClient sm = new SmtpClient();
sm.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis;
sm.Credentials = new NetworkCredential(tbUsername.Text, tbPassword.Text);
sm.Host = host;
sm.Port = port;
sm.Send(msg);
I don't have a SmartHost setup in IIS6, is there any obvious or any hints,tips that I can check out to get this working?