Click here to Skip to main content
15,126,367 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am trying send an email from code using smtp.

When i am trying to send an email to any "gmail" account, it is sending successfully.

but when i am trying to send an email to yahoo account, e.g ""
then unable to receive mail in my yahoo account.

My smtpClient.send method is not throwing any exception and same code is working for

i am just changing email address to ymail but it is not working.

What I have tried:

			Dim email3 As New MailMessage
            Dim smtpClient As New SmtpClient("mail client")

            email3.From = New MailAddress("")

            email3.Subject = "Mail Subject  :=> " + DateAndTime.Now.ToString()
            email3.Body = "Email body testing :=> " + DateAndTime.Now.ToString()
            email3.IsBodyHtml = True
            smtpClient = New SmtpClient("", 26)

            smtpClient.UseDefaultCredentials = False
            smtpClient.Credentials = New NetworkCredential("username", "password")
            smtpClient.EnableSsl = False
            smtpClient.Timeout = 100000


        Catch ex As Exception


        End Try
Updated 17-Aug-21 3:45am

1 solution

The fact that no exception is being thrown means that the message is being accepted by your server for delivery.

If it's not arriving, and it's not in the "junk" or "spam" folders, then you need to dig into the SMTP logs to find out why. If you're lucky, the logs on should explain the problem; otherwise, you'd need access to the logs on the recipient's Yahoo mailbox.

Without access to the logs, there is no way of knowing why the message has not arrived.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900