请教各位牛人!!为什么发不出附件
zqxqq 2003-10-06 07:11:28 <%
dim topic,mailbody,sendname,email,frommail,i,file1
file1=trim(request.Form("file1"))
topic=request.Form("Subject")
mailbody=request.Form("Content")
sendname=request.Form("sendname")
frommail=request.Form("from")
const smtpserve="smtp.chtc.biz"
const smtpuser="zhangyc@chtc.biz"
const smtpass="123456"
sub sendour(email)
Set jmail= server.CreateObject ("jmail.message")
jmail.Silent = true
jmail.Charset = "gb2312"
jMail.ContentType = "text/html"
jmail.From = frommail '//这里成你的发信人地址
jmail.FromName = sendname '//发信人姓名
jmail.Subject = topic '//标题
jmail.AddRecipient email '//地址
jmail.Body = mailbody '//内容
jmail.MailServerUserName = smtpuser
jmail.MailServerPassWord =smtpass
JMail.AddAttachment file1
isgo = jmail.Send( smtpserve)
jmail.Close
set jmail = nothing
end sub
%>
<html>
<head>
<title>发送邮件</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/class.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<TABLE width="700" border=0 align="center" cellPadding=0 cellSpacing=0>
<TBODY>
<TR>
<TD width="9%"> <DIV align=center><IMG height=39
src="images/via_t.gif" width=38></DIV></TD>
<TD vAlign=top width="91%"> <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD height=30 vAlign=bottom><STRONG>已发送邮件</STRONG> </TD>
<TD width="200" vAlign=bottom> </TD>
</TR>
<TR>
<TD
height=2 colspan="2" bgColor=#000000></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
</TBODY>
</TABLE>
<br>
<TABLE
width="700" border=0 align="center" cellPadding=0 cellSpacing=1 bgColor=#cccccc>
<TBODY>
<TR>
<TD bgColor=#eeeeee> <DIV align=center><br>
<table width="80%" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3"> <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="60">主题:</td>
<td>
<% response.Write(topic)%>
</td>
<td width="40">附件:</td>
<td width="200">
<% response.Write(file1)%>
</td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="3"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="60">内容:</td>
<td>
<% response.Write(mailbody)%>
</td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="3"><div align="center">
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center">发送人:
<%
response.Write(sendname)%>
</div></td>
<td><div align="center">回复邮件:
<% response.Write(frommail)
response.Write(path)
%>
</div></td>
</tr>
</table>
</div>
<div align="center"></div></td>
</tr>
<tr>
<%
i=request.form("sendmail").count-1
myVar = Request.form("sendmail")
if not isempty(myVar) then
myvarArray = split(myVar,",")
end if
%>
<td align="center">收件人姓名</td>
<td align="center">已发送邮件</td>
<td align="center">已发送手机短信</td>
</tr>
<%
for j=0 to i
mailArray = split(myvarArray(j),"|")
response.Write("<tr>")
response.Write("<td align='center'>")
response.Write(mailarray(0))
response.Write("</td>")
response.Write("<td align='center'>")
response.Write(mailarray(1))
call sendour(mailarray(1))
response.Write("</td>")
response.Write("<td align='center'>")
response.Write(mailarray(2))
response.Write("</td>")
response.Write("<tr>")
next
%>
</table>
<BR>
</DIV></TD>
</TR>
</TBODY>
</TABLE>
<br>
</body>
</html>