09-16-2012, 03:28 AM
Hi, BPFourms
I am working on my homework and it says that i have to make a mail sending program. I didn't online search and found this code but it doesn't work. Can some please help me?
I am working on my homework and it says that i have to make a mail sending program. I didn't online search and found this code but it doesn't work. Can some please help me?
Code:
Dim Message As New System.Net.Mail.MailMessage
Message.Subject = "test"
Message.Body = "test"
Message.From = New Net.Mail.MailAddress("my_account@gmail.com", "Derek")
With Message.To
.Add(New Net.Mail.MailAddress("test1@gmail.com", "Derek"))
.Add(New Net.Mail.MailAddress("test2@gmail.com", "Derek"))
End With
Dim Smtp As New System.Net.Mail.SmtpClient("smtp.gmail.com", 587)
Smtp.EnableSsl = True
Smtp.Credentials = New Net.NetworkCredential("my_gamil_account@gmail.com", "my_gmail_password")
Smtp.Send(Message)
Support me by take tour to BPForums http://bit.ly/YTBCS1
Get More Views on youtubehttp://addm.cc/?WIZ01V
Get More Views on youtubehttp://addm.cc/?WIZ01V