先注册一下这个组件
开始-运行-<regsvr32 盘符:\cdonts.dll >
用法:
if bt<>"" then
mto=request("mto")
mfm=request("mfm")
mcs=request("mcs")
mfj=request("mfj")
con=replace(request("con"),vbcrlf,"<br>")
title=request("tit")
if title="" then
a=a+"请填写信件主题"
elseif con="" then
a=a+"请输入信件内容!"
end if
if a<>"" then
response.Write"<script>alert('"&a&"');history.back();</script>"
else
set mail=server.CreateObject("cdonts.newmail")
mail.to=mto
mail.from=mfm
mail.subject=title
'mail.cc=mcs
mail.mailformat=0
mail.bodyformat=0
mail.body=con
mail.send
'response.Write "成功发送到"&mto
set mail=nothing
response.Write j+1&"封邮件发送成功!"
end if
end if
%><form action="" method="post" name="form1">
<br>
<br>
<table width="600" height="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#627A8F" style="word-break:break-all;font-size:9pt; ">
<tr bgcolor="#ECF0FC">
<td width="157"><div align="center">收信人地址</div></td>
<td width="440"><input name="mto" type="text" id="mto" value="<%=request.querystring("mail")%>" size="50"></td>
</tr>
<tr bgcolor="#ECF0FC">
<td><div align="center">发信人地址</div></td>
<td><input name="mfm" type="text" id="mfm" value="
3721@df88.net" size="50"></td>
</tr>
<tr bgcolor="#ECF0FC">
<td><div align="center">信件主题</div></td>
<td><input name="tit" type="text" id="tit" size="50"></td>
</tr>
<tr bgcolor="#ECF0FC">
<td><div align="center">信件内容</div></td>
<td><textarea name="con" cols="49" rows="16" id="con"></textarea></td>
</tr>
<tr bgcolor="#ECF0FC">
<td> </td>
<td><input name="bt" type="submit" id="bt" value="提交">
<input type="reset" name="Submit2" value="重置">
</td>
</tr>
</table>
</form>