大家经常探讨使用asp,而不使用其他组建能否实现文件的上传,从而开发出支持邮件附件的邮件系统,答案是可以的。请看:
以下是发送邮件的页面,邮件的帐号是员工号,假设是5位的数字,sendmail.asp当然是在合法登陆后才能够看到的
<%
meth=request.querystring("meth")
if meth=1 then
geterempl=trim(request.querystring("geterempl"))
emailtitle=trim(request.querystring("emailtitle"))
elseif meth=2 then
mailid=trim(request.querystring("mailid"))
set conn=server.createobject("adodb.connection")
conn.open "DSN=;UID=;PWD="
dsnpath="DSN=;UID=;PWD="
set rs=server.createobject("adodb.recordset")
selectnew="select * from t_mail where ((geterempl like %"%26amp;session("myid")%26amp;"% or deleempl like %"%26amp;session("myid")%26amp;"% or receempl like %"%26amp;session("myid")%26amp;"%)and (not deleverempl like %"%26amp;session("myid")%26amp;"%)) and mailid="%26amp;mailid%26amp;" "
rs.open selectnew,dsnpath,3,3
if rs.bof or rs.eof then
%>
<%
response.end
else
body=rs("body")
emailtitle=rs("emailtitle")
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
end if
%>