send email

zhaozj2021-02-16  88

Private subject (Sender As Object, e as system.eventargs) Dim Mail as new mailmessage () mail.to = "me@mycompany.com" mail.from = "You@yourcompany.com" mail.subject = "this is IS a test email. "mail.body =" Some text Goes here "mail.fields.add (" http://schemas.microsoft.com/cdo/configuration/smtpauthenticate "," 1 ") 'Basic Authentication Mail.fields. Add ("http://schemas.microsoft.com/cdo/configuration/sendusername", "MY_USERNAME_HERE") 'set your username here mail.fields.add ("http://schemas.microsoft.com/cdo/configuration/ SendPassword "," super_secret ") 'set you password here smtpmail.smtpserver =" mail.mycompany.com "' Your Real Server Goes Here Smtpmail.send (Mail) End Sub 'Page_load

转载请注明原文地址:https://www.9cbs.com/read-11749.html

New Post(0)