01.
Dim
SmtpServer
As
New
SmtpClient()
02.
Dim
myMail
As
New
System.Net.Mail.MailMessage()
03.
SmtpServer.Credentials =
New
Net.NetworkCredential(
"jiraphan.jitt@gmail.com"
,
"xxxxxxx"
)
04.
SmtpServer.Port = 465
05.
SmtpServer.Host =
"smtp.gmail.com"
06.
SmtpServer.EnableSsl =
True
07.
myMail.From =
New
System.Net.Mail.MailAddress(
"jiraphan.jitt@gmail.com"
)
08.
myMail.
To
.Add(
"znorei@hotmail.com"
)
09.
myMail.Subject =
"Account Username and Password"
10.
myMail.IsBodyHtml =
True
11.
myMail.Body =
"Username = "
& dt.Rows(0)(
"Username"
).ToString &
""
& _
12.
"<br> Password = "
& dt.Rows(0)(
"Password"
).ToString()
13.
SmtpServer.UseDefaultCredentials =
True
14.
SmtpServer.Send(myMail)
15.
myMail =
Nothing
16.
MsgBox(
"Your password has been send to mail ("
& dt.Rows(0)(
"Email"
).ToString() &
")"
)