I am using the following code to send a single email to a users. The cc email is coming through but the email to [email protected] is not. I have gotten messages several hours later that these email are being delayed (I am only testing now so these are all coming to me). I have tried setting some parameters in my web.config file but right now have nothing there with regards to email.
Dim Mail As New System.Net.Mail.MailMessage
Dim em As String = "[email protected]"
Dim m As String = "Test"
Mail.From = New System.Net.Mail.MailAddress(em, "KW")
Mail.To.Add("[email protected]")
Mail.Subject = "Test Message"
Mail.Body = m
Mail.IsBodyHtml = False
Mail.CC.Add(em)
Dim smtp As New System.Net.Mail.SmtpClient("localhost")
Mail.Headers.Add("Reply-To", em)
Mail.Priority = System.Net.Mail.MailPriority.Normal
smtp.Credentials = New System.Net.NetworkCredential(em, "****")
smtp.Send(Mail)
Any help would be appreciated.
Thanks
Kevin
Dim Mail As New System.Net.Mail.MailMessage
Dim em As String = "[email protected]"
Dim m As String = "Test"
Mail.From = New System.Net.Mail.MailAddress(em, "KW")
Mail.To.Add("[email protected]")
Mail.Subject = "Test Message"
Mail.Body = m
Mail.IsBodyHtml = False
Mail.CC.Add(em)
Dim smtp As New System.Net.Mail.SmtpClient("localhost")
Mail.Headers.Add("Reply-To", em)
Mail.Priority = System.Net.Mail.MailPriority.Normal
smtp.Credentials = New System.Net.NetworkCredential(em, "****")
smtp.Send(Mail)
Any help would be appreciated.
Thanks
Kevin