<%if request("action")="send" then%>
<%
chr(32)参数说明
chr(32)Subject : 邮件标题
chr(32)MailAddress : 发件服务器的地址,如smtp.163.com
chr(32)Email : 收件人邮件地址
chr(32)Sender : 发件人姓名
chr(32)Content : 邮件内容
chr(32)Fromer : 发件人的邮件地址
Sub SendAction(subject, email, sender, content)
Set JMail = Server.CreateObject("JMail.Message")
JMail.Charset = "gb2312" chr(32) 邮件字符集,默认为"US-ASCII"
JMail.From = strMailUser chr(32) 发送者地址
JMail.FromName = senderchr(32) 发送者姓名
JMail.Subject =subject
JMail.MailServerUserName = strMailUserchr(32) 身份验证的用户名
JMail.MailServerPassword = strMailPass chr(32) 身份验证的密码
JMail.Priority = 3
JMail.AddRecipient(email)
JMail.Body = content
JMail.Send(strMailAddress)
End Sub
chr(32)调用此Sub的例子
Dim strSubject,strEmail,strMailAdress,strSender,strContent,strFromer
strSubject = Request("title")
strContent = "用户Email:" & Request("From") & VbCrLf & "电话:" & Request("Tel") & VbCrLf & "内容:" & vbcrlf & Request("content")
strSender = Request("Name")
strEmail = "anybody@163.com" chr(32)这是收信的地址,可以改为其它的邮箱
strMailAddress = "mail.yourdomain.com" chr(32)我司企业邮局地址,请使用 mail.您的域名
strMailUser = "user@yourdomain.com" chr(32)我司企业邮局用户名
strMailPass = "mailpassword" chr(32)邮局用户密码
Call SendAction (strSubject,strEmail,strSender,strContent)
%>
<%else%>
发邮件给我们
|
||||||||
|