to duqiu
首先多谢你光顾此问题!
其次,根据您的建议,现贴出源程序如下:
<%@ Language=VbScript %>
<% '电子邮件发送程序: e_mail_cgi.asp
dim str_mailzt,str_mailnr,str_fromname,str_fileup1,str_fileup2,str_fileup3
str_mailzt=trim(request("mail_zt"))
str_mailnr=trim(request("mail_nr"))
str_fromname=trim(request("from_name"))
str_fileup1=trim(request("file_up1"))
str_fileup2=trim(request("file_up2"))
str_fileup3=trim(request("file_up3"))
if (instr(str_fileup1,":/")<>2 and (instr(str_fileup1,".")<>len(str_fileup1)-3 or instr(str_fileup1,".")<>len(str_fileup1)-4)) then
str_fileup1=""
End If
if (instr(str_fileup2,":/")<>2 and (instr(str_fileup2,".")<>len(str_fileup2)-3 or instr(str_fileup2,".")<>len(str_fileup2)-4)) then
str_fileup2=""
End If
if (instr(str_fileup3,":/")<>2 and (instr(str_fileup3,".")<>len(str_fileup3)-3 or instr(str_fileup3,".")<>len(str_fileup3)-4)) then
str_fileup3=""
End If
Set myMail = Server.CreateObject("CDONTS.NewMail")
with mymail
.from = str_str_fromname
.to ="ndnw@sina.com"
.subject = str_mailzt
.body = str_mailnr
.BodyFormat =1
.mailFormat = 0
if str_fileup1 <>"" then
.AttachFile (str_fileup1)
end if
if str_fileup2 <>"" then
.AttachFile (str_fileup2)
end if
if str_fileup3 <>"" then
.AttachFile (str_fileup3)
end if
.send
end with
Set myMail = Nothing
%>
<HTML>
<HEAD><TITLE></TITLE>
<meta http-equiv="Content-Type" content="text/html;
charset=gb2312">
<style type=text/css>
<!--
.cur4 {FONT-FAMILY: "宋体";
FONT-SIZE: 13px}
.head {coloR: green;
FONT-FAMILY: "宋体";
FONT-SIZE: 13px;FONT-WEIGHT: bolder}
.head0 {coloR: #0000ff;
FONT-FAMILY: "宋体";
FONT-SIZE: 13px;FONT-WEIGHT: bolder}
TD {FONT-FAMILY: "宋体";
FONT-SIZE: 9pt}
a:link{text-decoration:none}
a:visited{text-decoration:none;color:#lightred}
a:active{text-decoration:none;color:green}
a:hover{text-decoration:none;color:#ff6600}
-->
</style>
</head>
<div align="center"><center>
<BODY aLink=#ff0000 bgcolor=#5F908F leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
<TABLE align=center cellPadding=0 cellSpacing=0 width=655 bgcolor=#FFE7B7>
<TBODY>
<tr height=60><td></td></tr>
<TR>
<td align=center><font class=cur4>邮件发送成功!,请<A href="javascript:history.back()">[返回]</a></font>
</td></tr>
<tr height=60><td></td></tr>
</tbody>
</table>
</body>
</center>
</div>
</html>