12-11-2009, 02:39 PM
I am coding a Live email sender.
Is the code i'm using right? When I debug and try and send, It highlights SMTPServer.Send(MyMailMessage) :S
Thanks for any help.
Code:
MyMailMessage.From = New MailAddress(TextBox3.Text)
MyMailMessage.To.Add(TextBox3.Text)
MyMailMessage.Subject = (TextBox4.Text)
MyMailMessage.Body = (TextBox5.Text & vbCrLf)
Dim SMTPServer As New SmtpClient("smtp.live.com")
SMTPServer.Port = 25
SMTPServer.Credentials = New System.Net.NetworkCredential(TextBox1.Text, TextBox2.Text)
SMTPServer.EnableSsl = True
SMTPServer.Send(MyMailMessage)
Is the code i'm using right? When I debug and try and send, It highlights SMTPServer.Send(MyMailMessage) :S
Thanks for any help.