'產生smtpclient物件
        Dim gmailinfo() As String = Split(System.Configuration.ConfigurationManager.AppSettings("gmailinfo"), ",")

        Dim smtp As New SmtpClient(gmailinfo(0), Val(gmailinfo(1)))

        smtp.Credentials = New System.Net.NetworkCredential(gmailinfo(2), gmailinfo(3))
        Net.ServicePointManager.SecurityProtocol = Net.SecurityProtocolType.Tls12
        smtp.EnableSsl = True

        smtp.Send(email)
最後修改日期: 2021-02-18

作者

留言

撰寫回覆或留言

發佈留言必須填寫的電子郵件地址不會公開。