Hey all
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

You have to look at your mail logs and see whats going on with the smtp on the server, the log should have detailed info of whats going on with the send mail.

Could you please tell me where the log will be located . i also have same problem ! . it some time goes straight into queue folder in no time.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.