最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
以前收集的一些资料---一个使用CDO的邮件列表ASP程序(管理端)
时间:2008-01-12 编辑:简简单单 来源:一聚教程网
这是整个邮件列表程序服务端,由管理者运行:
文件名mailadmin.asp:
<%
'使用这段代码时,请将所有的邮件列表(后缀为lst)文件和
'信件文件(后缀为ltr)都放到根目录basedir中,并保证对给目录有写的权限
Dim debug
debug = false
BASEDIR = Server.MapPath("/tmp/maillist")
Forreading = 1
Forwriting = 2
Forappending = 8
'分隔字符
delimiter = "|"
' 本代码的URL注意不是路径
SCRIPT_URL="mailadmin.asp"
' 代码中使用了CDO NTS来发送邮件
' $DEFAULT_EMAIL是来保存默认的寄信人地址的变量(可根据自己情况进行修改)
DEFAULT_EMAIL="YourName@YourMailServer"
cpr = ""
if strcomp(Request.ServerVariables("REQUEST_METHOD"), "POST", vbtextcompare) <> 0 and _
strcomp(Request.ServerVariables("QUERY_STRING"), "", vbtextcompare) = 0 then
query_form
Response.End
end if
if strcomp(Request.ServerVariables("REQUEST_METHOD"), "POST", vbtextcompare) = 0 and _
Request.Form("action") = "LIST" then
get_list
Response.End
end if
if strcomp(Request.ServerVariables("REQUEST_METHOD"), "POST", vbtextcompare) = 0 and _
Request.Form("action") = "SENDMAIL" then
send_mail
Response.End
end if
if strcomp(Request.ServerVariables("REQUEST_METHOD"), "POST", vbtextcompare) = 0 and _
Request.Form("action") = "POSTLETTER" then
post_letter
Response.End
end if
if strcomp(Request.ServerVariables("REQUEST_METHOD"), "POST", vbtextcompare) = 0 and _
文件名mailadmin.asp:
<%
'使用这段代码时,请将所有的邮件列表(后缀为lst)文件和
'信件文件(后缀为ltr)都放到根目录basedir中,并保证对给目录有写的权限
Dim debug
debug = false
BASEDIR = Server.MapPath("/tmp/maillist")
Forreading = 1
Forwriting = 2
Forappending = 8
'分隔字符
delimiter = "|"
' 本代码的URL注意不是路径
SCRIPT_URL="mailadmin.asp"
' 代码中使用了CDO NTS来发送邮件
' $DEFAULT_EMAIL是来保存默认的寄信人地址的变量(可根据自己情况进行修改)
DEFAULT_EMAIL="YourName@YourMailServer"
cpr = ""
if strcomp(Request.ServerVariables("REQUEST_METHOD"), "POST", vbtextcompare) <> 0 and _
strcomp(Request.ServerVariables("QUERY_STRING"), "", vbtextcompare) = 0 then
query_form
Response.End
end if
if strcomp(Request.ServerVariables("REQUEST_METHOD"), "POST", vbtextcompare) = 0 and _
Request.Form("action") = "LIST" then
get_list
Response.End
end if
if strcomp(Request.ServerVariables("REQUEST_METHOD"), "POST", vbtextcompare) = 0 and _
Request.Form("action") = "SENDMAIL" then
send_mail
Response.End
end if
if strcomp(Request.ServerVariables("REQUEST_METHOD"), "POST", vbtextcompare) = 0 and _
Request.Form("action") = "POSTLETTER" then
post_letter
Response.End
end if
if strcomp(Request.ServerVariables("REQUEST_METHOD"), "POST", vbtextcompare) = 0 and _
相关文章
- VBS 批量Ping的项目讲解 09-19
- 如何封装一个Ajax函数介绍 09-16
- ASP实现加法验证码方法 09-16
- ASP错误捕获的几种常规处理方法介绍 09-16
- ajax实现城市三级联动的代码介绍 09-16
- asp中获取日期为星期几的技巧 09-14