用ASP发送邮件
用ASP发送邮件,用ASP发送邮件
首先
Set mail = Server.CreateObject("CDONTS.NewMail")以呼叫SMTP Service的元件,然后设定:
mail.To = "收件者E-Mail地址"
mail.From = "寄件者的E-Mail地址"
mail.Subject = "主旨"
mail.Body = "E-mail内文"
最后Mail.Send即开始发送邮件。
例如:
<%
Set mail = Server.CreateObject("CDONTS.NewMail")
mail.TO = "abc@xxx.com"
mail.From = "yourmail@xxx.com"
mail.Subject = "主题"
mail.Body = "E-Mail内容"
mail.Send
%