<%
Sub SendMail (mail_to,mail_subject,mail_body)
'On Error Resume Next
Dim JMail
userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If userip = "" Then userip = Request.ServerVariables("REMOTE_ADDR") '获得真实IP
Set JMail = Server.CreateObject("JMail.Message")
JMail.silent = true
JMail.Charset = "gb2312" '字符集,缺省为"US-ASCII"
JMail.ISOEncodeHeaders = False
JMail.MailServerUserName = "sanmao-2000@163.com" '发信邮箱帐号
JMail.MailServerPassword = "*******" '发信邮箱密码
JMail.From = "sanmao-2000@163.com" '发信人的邮件地址
JMail.FromName = "流云" '发信人的名字
JMail.Subject = mail_subject '设定邮件的标题
'JMail.ReplyTo = "liuyun-11912@163.com" '指定别的回信地址
JMail.Priority = 1
JMail.AddHeader "Originating-IP",userip '添加用户定义的信件标头
JMail.AddRecipient(mail_to) '收信人邮件地址
JMail.Body = mail_body '信件正文
JMail.Send("smtp.163.com") 'SMTP地址
JMail.Close()
Set JMail = Nothing
response.write "Send OK."
End Sub
Call SendMail ("deeone@tom.com","发信测试.","Hi,现在好吧!!!")
%>
Sub SendMail (mail_to,mail_subject,mail_body)
'On Error Resume Next
Dim JMail
userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If userip = "" Then userip = Request.ServerVariables("REMOTE_ADDR") '获得真实IP
Set JMail = Server.CreateObject("JMail.Message")
JMail.silent = true
JMail.Charset = "gb2312" '字符集,缺省为"US-ASCII"
JMail.ISOEncodeHeaders = False
JMail.MailServerUserName = "sanmao-2000@163.com" '发信邮箱帐号
JMail.MailServerPassword = "*******" '发信邮箱密码
JMail.From = "sanmao-2000@163.com" '发信人的邮件地址
JMail.FromName = "流云" '发信人的名字
JMail.Subject = mail_subject '设定邮件的标题
'JMail.ReplyTo = "liuyun-11912@163.com" '指定别的回信地址
JMail.Priority = 1
JMail.AddHeader "Originating-IP",userip '添加用户定义的信件标头
JMail.AddRecipient(mail_to) '收信人邮件地址
JMail.Body = mail_body '信件正文
JMail.Send("smtp.163.com") 'SMTP地址
JMail.Close()
Set JMail = Nothing
response.write "Send OK."
End Sub
Call SendMail ("deeone@tom.com","发信测试.","Hi,现在好吧!!!")
%>