|
- <%
- dim ttasp
- dim Attachment
- Attachment =server.MapPath("0410.rar")
- ttasp="测试看看"
- dim objMail
- Set objMail = Server.CreateObject("CDO.Message")
- smtpServer ="smtp.exmail.qq.com"
- yourEmail ="support@ttasp.com"
- yourPassword ="771"
-
- sendEmailTo ="774658@qq.com"'收件人EMai
- objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
- objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpServer
- objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
- objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
- objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = true
- objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = yourEmail
- objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = yourPassword
- objMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
- objMail.Configuration.Fields.Update
- objMail.From = yourEmail
- objMail.To = sendEmailTo
-
- objMail.Subject= "新家教编号"
- objMail.htmlBody = ttasp
- objMail.AddAttachment(Attachment)
- objMail.Send
- Set objMail = Nothing
- response.Write("ok")
- %>
复制代码
亲测有效 |
|