以前收集的一些资料---一个使用CDO的邮件列表ASP程序(管理端)
这是整个邮件列表程序服务端,由管理者运行: 文件名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 _ Request.Form("action") = "EDIT" then ltr_editor Response.End end if if strcomp(Request.ServerVariables("REQUEST_METHOD"), "POST", vbtextcompare) = 0 and _ Request.Form("action") = "PURGE" then |
查看所有评论
