|
<%
On Error Resume Next
Dim JMail
Set JMail=Server.CreateObject("JMail.Message")
If JMail Is Nothing Then
Response.Write "不支持"
Else
Response.Write "支持"
End If
%>
- <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
- <%
- response.charset="utf-8"
- Set msg = Server.CreateObject("JMail.Message")
- msg.Logging = true
- msg.Charset = "gb2312"
- msg.MailServerUserName = "travel@163.com" '//填写发信人邮箱
- msg.MailServerPassword = "XUUWKYTPDE" '//授权码/邮箱密码
- msg.Priority = 1
- msg.From = "travel@163.com" '//填写发信人邮箱
- msg.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
- msg.FromName = "ttasp"
- msg.AddRecipient "97492@qq.com" '//收信人邮箱
- msg.Subject = "测试标题"
- msg.Body = "邮件内容"
- if not msg.Send("smtp.163.com") then '//如果是其他邮箱,换成邮局对应的smtp服务器地址
- Response.write "邮件未能发送"
- else
- Response.write "成功"
- end if
- msg.Close()
- Set msg = Nothing
- %>
复制代码 |
|