Can someone help me with this?
A first chance exception of type 'System.Net.Mail.SmtpException' occurred in System.dll
when i press i receive that message in 2 seconds.
here's my code!
Dim MyMailMessage As New MailMessage()
Try
MyMailMessage.From = New MailAddress("fromemail@gmail.com")
MyMailMessage.To.Add("sasdsa@hotmail.com")
MyMailMessage.Subject = TextBox1.Text
MyMailMessage.Body = TextBox2.Text
Dim SMTP As New SmtpClient("smtp.gmail.com")
SMTP.Port = 587
SMTP.EnableSsl = True
SMTP.Credentials = New System.Net.NetworkCredential("eusername", "jpassword")
SMTP.Send(MyMailMessage)
MsgBox("Message Has Been sent!!")
Catch ex As Exception
End Try
the msgbox doesnt show too!
I hope that someone will help me with this.