Hi Team,
I am trying to send email using Asp.net with code behind Vb.net. I cant able to send email and it was not throwing any exceptions. Please help me where it was getting hick up.
I am trying to send email using Asp.net with code behind Vb.net. I cant able to send email and it was not throwing any exceptions. Please help me where it was getting hick up.
Code:
Try
message.From = New MailAddress("krisssgopi@gmail.com")
message.To.Add(New MailAddress("jeganrengasamy@gmail.com"))
message.IsBodyHtml = False
message.Priority = MailPriority.Normal
message.Subject = "Hi Buddy.."
message.Body = "This is testing mail.."
MsgBox("message sent..")
smtp.Host = "smtp.gmail.com"
smtp.Port = 25
smtp.UseDefaultCredentials = False
smtp.Credentials = New System.Net.NetworkCredential("krisssgopi", "xxxxxx")
smtp.DeliveryMethod = SmtpDeliveryMethod.Network
smtp.Send(message)
MsgBox("message sent..")
Catch ex As Exception
ex.Message.ToString()
End Try
Comment