| 下载中心 | 文章中心 | 虚拟主机 | 网站开发 | 加入收藏 | 设为首页  
   本站首页 | 公司资讯 | 业内资讯 | 服务器类 | 黑客相关 | 私服技术 | 家用电脑 | 网站建设 | 局域网类 | 网吧相关 | 游戏攻略 | 编程开发 | 软件应用 | 硬件维修 | 分类
 站内搜索:
  百度热门搜索: it教育 网络教育 网站推广 创业致富 电动车 太阳能 瘦身产品 公告: 联邦电脑十周年系列操作系统,快速稳定,欢迎下载使用!
  热门阅读
  相关文章
asp使用jmail4.3的模块
作者:佚名  来源:不详  发布时间:2007-5-3 17:52:03  发布人:snlb

减小字体 增大字体

把程序放到一个文件中,然后包含再call就可以了。(JMAIL4.3)

<%'警告函数
sub w_msg(message,w_to,w_link)
'message是你要弹出的警告信息,w_to=1表示自动后退一页,当w_to<>1时w_link表示要跳转的页面
if w_to="1" then
%>
<script language="javascript">
<!--
function Index(){ window.alert('<%=message%>');history.back(-1)}
Index();
-->
</script>
<%else%>
<script language="javascript">
<!--
function Index(){ window.alert('<%=message%>');window.location="<%=w_link%>"}
Index();
-->
</script>
<%end if
end sub%>
<%
sub sendmail(mailtitle,mailtext,mailaddress,mailcc,mailbcc,attachment,mailserver)
if mailtitle="" then
mailtitle="系统测试邮件"
end if
if mailtext="" then
mailtext="Just a test"
end if
if mailaddress="" then
call w_msg("邮件地址不能为空","1","")
end if
if mailserver="" then
mailserver="smtp.163.com"
end if
set msg=server.createobject("JMail.Message")
msg.silent = true
msg.logging = true
msg.Charset="GB2312"
msg.ContentType = "text/html"
msg.MailServerUserName="yourusername"
msg.MailServerPassword="yourpassword"
msg.From="youremail"
msg.FromName="dorryyang"
mailaddress_s=split(mailaddress,",")   ' 邮件地址用,格开
for i=0 to ubound(mailaddress_s)
msg.AddRecipient trim(mailaddress_s(i))
next
if mailcc<>"" then
mailcc_s=split(mailcc,",")
for i=0 to ubound(mailcc_s)
msg.AddRecipientCC trim(mailcc_s(i))
next
end if
if mailbcc<>"" then
mailbcc_s=split(mailbcc,",")
for i=0 to ubound(mailbcc_s)
msg.AddRecipientBCC trim(mailbcc_s(i))
next
end if
if attachment<>"" then
msg.AddAttachment(attachment)  'attachment写附件地址
end if
msg.Subject=mailtitle
msg.HTMLBody=mailtext
msg.Send(mailserver)
msg.close
set msg=nothing
call w_msg("发送成功","1","")
end sub
%>


[ ] [返回上一页] [打 印] [收 藏]
关于本站 - 网站帮助 - 广告合作 - 下载声明 - 网站地图
  联邦电脑版权所有 Copyright©1996-2004 联邦电脑 All Rights Reserved  
   xkej@sina.com 业务联系:0516-88380202 88085202 QQ: 81566563  
  苏ICP备05045772号 当前在线人数: