|
I am trying to send a mail using Gmail. ASP .NET
Here's the code
Dim oMailMessage As New MailMessage("mailfrom@gmail.com", "mailto@yahoo.com", "Test Mail", "Hello World This is just a test")
Dim oSmtpClient As New SmtpClient
oSmtpClient.Host = "smtp.gmail.com"
oSmtpClient.EnableSsl = True
oSmtpClient.Port = "587"
oSmtpClient.Credentials = New System.Net.NetworkCredential("murugan.ad", "******")
oSmtpClient.Send(oMailMessage)
Make sure that the SmtoClient.EnableSsl is enabled and Port is 587
|