i m trying to send progaramatically an email to user. i receive message "Email sent successfully".but email is not deliveing... i have two problems
1.Email sent to yahoo id is in queue from yesterday as i checked it in Inetpub>mailroot>queue.
2.Email sent to hotmail id is neither in queue nor in inbox.
Here are my lines of code:
Dim toaddress As String = strTo Dim fromaddress As String = txtFrom.Text Dim oMail As New MailMessage With oMail .From = New MailAddress(fromaddress) .To.Add(toaddress) .Subject = txtSubject.Text .Body = strBody oMail.IsBodyHtml = True End With Dim oSMTP As New System.Net.Mail.SmtpClient With oSMTP .Host = System.Configuration.ConfigurationManager.AppSettings("SmtpServer") .DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis .Send(oMail) End With