%
dim action,TrueName,Tel,Email,Content,Code
action=request.form("act")
if action="fastreg" then
TrueName=request.Form("TrueName")
Code=request.Form("E_address")
Tel=request.Form("Tel")
Email=request.Form("Email")
Content=request.Form("Content")
if action="fastreg" then
if IsValidEmail(Email)=False then
response.write""
response.end
end if
dim mailtext
mailtext="
"&vbcrlf
mailtext=mailtext&"
姓名:
"&TrueName&"
"&vbcrlf
mailtext=mailtext&"
身份证号:
"&E_address&"
"&vbcrlf
mailtext=mailtext&"
联系电话:
"&AreaCode&" - "&Tel&"
"&vbcrlf
mailtext=mailtext&"
电子邮箱:
"&Email&"
"&vbcrlf
mailtext=mailtext&"
内 容:
"&Content&"
"&vbcrlf
mailtext=mailtext&"
"
'发送邮件到客服邮箱
'使用Jmail发邮件(主题,邮件内容,收件人,发件人,发件人名称,答复地址,SMTP服务器地址,用户名,密码)
Subject="在线举报--中国在线招生"
HtmlBody=mailtext
MailTo="edu@eduunion.org"
'MailTo="ls363@hotmail.com"
MailFrom="edu@zsol.org"
MailFromName="中国在线招生"
MailReplyTo=E_mail
SMTP="202.75.216.213"
UserName="edu@zsol.org"
PassWord="jy1209"
call JmailSend(Subject,HtmlBody,MailTo,MailFrom,MailFromName,MailReplyTo,SMTP,UserName,PassWord)
end if
end if
%>
中国在线招生——关于我们
Copyright(C) 2006 www.zsol.org All rights reserved. 浙ICP备06036992号
网络实名: 中国在线招生 在线招生 通用网址: 中国在线招生
传真:0571-56778285 E-mail: job@teachcn.com
<%
'使用Jmail发邮件(主题,邮件内容,收件人,发件人,发件人名称,答复地址,SMTP服务器地址,用户名,密码)
Function JmailSend(Subject,HtmlBody,MailTo,MailFrom,MailFromName,MailReplyTo,SMTP,UserName,PassWord)
dim jmail
Set jmail = Server.CreateObject("JMAIL.Message") '建立发送邮件的对象
jmail.silent = true '屏蔽例外错误,返回FALSE跟TRUE两值j
jmail.logging = true '启用邮件日志
jmail.Charset = "GB2312" '邮件的文字编码为国标
jmail.ContentType = "text/html" '邮件的格式为HTML格式
jmail.AddRecipient MailTo '邮件收件人的地址
jmail.FromName = MailFromName '发件人名称
jmail.From = MailFrom '发件人的E-MAIL地址
jmail.Replyto = MailReplyTo '发件人的E-MAIL地址
jmail.MailServerUserName = UserName '登录邮件服务器所需的用户名
jmail.MailServerPassword = PassWord '登录邮件服务器所需的密码
jmail.Subject = Subject '邮件的标题
jmail.Body =HtmlBody '邮件的内容
jmail.Priority = 1 '邮件的紧急程序,1 为最快,5 为最慢, 3 为默认值
jmail.Send(SMTP) '执行邮件发送(通过邮件服务器地址)
jmail.Close() '关闭对象
set jmail=nothing '清空Jmail对象
end Function
function IsValidEmail(email)
dim names, name, i, c
IsValidEmail = true
if email="" or Isnull(email) = True then
IsValidEmail = false
exit function
end if
names = Split(email, "@")
if UBound(names) <> 1 then
IsValidEmail = false
exit function
end if
for each name in names
if Len(name) <= 0 then
IsValidEmail = false
exit function
end if
for i = 1 to Len(name)
c = Lcase(Mid(name, i, 1))
if InStr("abcdefghijklmnopqrstuvwxyz_-.", c) <= 0 and not IsNumeric(c) then
IsValidEmail = false
exit function
end if
next
if Left(name, 1) = "." or Right(name, 1) = "." then
IsValidEmail = false
exit function
end if
next
if InStr(names(1), ".") <= 0 then
IsValidEmail = false
exit function
end if
i = Len(names(1)) - InStrRev(names(1), ".")
if i <> 2 and i <> 3 then
IsValidEmail = false
exit function
end if
if InStr(email, "..") > 0 then
IsValidEmail = false
end if
end function
%>