Dim myMail As New System.Net.Mail.MailMessage
Dim Cred As New System.Net.NetworkCredential("[email protected]", "password")
myMail.To.Add("[email protected]")
myMail.Subject = "Test send mail message"
myMail.From = New System.Net.Mail.MailAddress("[email protected]")
myMail.IsBodyHtml = True
myMail.Body = "Hi Sawatdee.<br><br>Sabye dee mai."
Dim SmtpMail As New System.Net.Mail.SmtpClient("smtp.gmail.com")
SmtpMail.UseDefaultCredentials = False
SmtpMail.EnableSsl = True
SmtpMail.Credentials = Cred
SmtpMail.Port = 465
SmtpMail.Send(myMail)
myMail = Nothing
Response.Write("SMTP GMail Sending.")
Dim myMail As New System.Net.Mail.MailMessage ---> System.Net.Mail.MailMessage โปรแกรมไม่รู้จัก
Dim Cred As New System.Net.NetworkCredential("[email protected]", "password")
myMail.To.Add("[email protected]")
myMail.Subject = "Test send mail message"
myMail.From = New System.Net.Mail.MailAddress("[email protected]") ---> System.Net.Mail.MailAddress โปรแกรมไม่รู้จัก
myMail.IsBodyHtml = True
myMail.Body = "Hi Sawatdee.<br><br>Sabye dee mai."
Dim SmtpMail As New System.Net.Mail.SmtpClient("smtp.gmail.com") ---> System.Net.Mail.SmtpClient โปรแกรมไม่รู้จัก
SmtpMail.UseDefaultCredentials = False
SmtpMail.EnableSsl = True
SmtpMail.Credentials = Cred
SmtpMail.Port = 465
SmtpMail.Send(myMail)