0

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
3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by demigod
0

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.

0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.