·您现在的位置: 云翼网络 >> 文章中心 >> 网站建设 >> 网站建设开发 >> ASP网站建设 >> CDONTS发电子邮件例子

CDONTS发电子邮件例子

作者:佚名      ASP网站建设编辑:admin      更新时间:2022-07-23
Click here to copy the Code to your clipboard (Only for IE Users)


'Declare Variables
Dim CDONTSObj, MessageBody

'Create the CDONTS object
Set CDONTSObj = Server.CreateObject("CDONTS.NewMail")

'To Address
CDONTSObj.To = "[email protected]"

'From Address
CDONTSObj.From = "[email protected]"

'CC Email Addresses seperated by a comma
CDONTSObj.cc = "[email protected],[email protected]"

'Your Email Message
MessageBody = "Sending a email using asp was never so easy ! "

'Subject of the Email Message
CDONTSObj.Subject = "Send a Email"

'Assigning the value of your message to the Object
CDONTSObj.Body = MessageBody

'Send the email
CDONTSObj.Send

'Set the CDONTS object to nothing
Set CDONTSObj = nothing