NEED HELP CODING EMAIL SENDER!!!
Could someone please find out the problem..
smtpServer.Send()
That times out and it never sends the email...
PLEASE HELP
CODE:
[highlight=vb.net]
Imports System.Net.Mail
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim smtpServer As New SmtpClient()
Dim mail As New MailMessage()
smtpServer.Credentials = New Net.NetworkCredential(" *******@gmail.com", "******")
smtpServer.Port = 587
smtpServer.Host = "smtp.gmail.com"
smtpServer.EnableSsl = True
mail = New MailMessage()
mail.From = New MailAddress("**********@gmail.com")
mail.To.Add("**********@gmail.com")
mail.Subject = "Test"
mail.Body = "Test"
smtpServer.Send()
End Sub
[/highlight]