å¦Âä½Âç¨ç»Â件å®Âç°èªå¨åÂÂéÂÂçµåÂÂé®件ï¼Â
JMailUploadAutoForm.asp
<html>
<body>
<font face=”verdana, arial” size=”2″><b>
<form method=”post” action=”JmailUploadAutoFormProcess.asp” ENCTYPE=”multipart/form-data”>
<p>æ¼éªåÂኼÂä¹Âå¨åÂÂéÂÂçµåÂÂé®件</p>xml:namespace prefix = o ns = “urn:schemas-microsoft-com:office:office” /??
请填åÂÂ好表åÂÂ,ç¹åÂȌÂÂéÂÂ!
<br><br>
æ¨çÂÂå§ÂÃ¥ÂÂ<br>
<input type=”text” size=”25″ name=”name”><br>
çµåÂÂé®件å°åÂÂ<br>
<input type=”text” size=”25″ name=”email”><br>
æÂ¥æ¶é®件å°åÂÂ<br>
<input type=”text” size=”25″ name=”recipient”><br>
æ¨æ³…<br>
<select name=”subject” size=”1″>
<option value=”help”>å¨询
<option value=”hello”>é®åÂÂ
<option value=”other”>Ã¥Â
¶å®Â
</select>
<br>
主é¢Â<br>
<input type=”text” size=”25″ name=”tipic”><br>
æ¦Âè¿°<br>
<input type=”text” size=”25″ name=”resume”><br>
请è¾ÂÃ¥Â
¥æ¨çÂÂÃ¥ÂÂ
容<br>
<textarea name=”question” cols=”40″ rows=”15″ wrap=”PHYSICAL”></textarea>
<br>
<br>
<br>
éÂÂ件1<br>
<input type=”file” name=”attachment1″>
<br>
<br>
éÂÂ件2<br>
<input type=”file” name=”attachment2″>
<br>
<br>
éÂÂ件3<br>
<input type=”file” name=”attachment3″>
<br>
<br>
<input type=”submit” value=”Ã¥ÂÂé“>
</form>
</b>æÂÂè°¢åÂ
Â临éÂÂé£Âèµ·èÂÂ!
</font>
</body></html>
JmailUploadAutoFormProcess.asp
<%
Set upload = Server.CreateObject( “w3.Upload” )
Set JMail = Server.CreateObject(“JMail.SMTPMail”)
for i = 0 to upload.form.count-1
if upload.form( i ).isFile then
set attachment = upload.Form( i )
JMail.AddCustomAttachment attachment.filename, attachment.item
‘ æ£ÂæÂ¥éÂÂ件并å åÂ
¥é®件.æÂÂæÂÂÃ¥Â
¶ä»ÂçÂÂformÃ¥Â
Â素被å å°é®件éÂÂ.
else
JMail.appendtext( upload.form( i ).name & “: ” & upload.form( i ).item & vbcrlf )
end if
next
Name = upload.Form(“name”)
SenderEmail = upload.Form(“email”)
Subject = “Regarding ” & upload.Form(“subject”)
Recipient = upload.Form(“recipient”)
‘ å¾Âå°formÃ¥ÂÂéÂÂ,ç¨ä¸Âä¼ ç»Â件.
JMail.ServerAddress = “mail.intels.net”
‘ è¾ÂÃ¥Â
¥ä½ çÂÂSMTP-server.
JMail.Sender = Senderemail
JMail.Subject = Subject
JMail.AddRecipient Recipient
JMail.Priority = 3
JMail.Execute
%>
<html>
<body>
<BR>
<BR>
<p align=”center”><font face=”Arial, geneva” size=”5″>
é®件åÂÂéÂÂæÂÂÃ¥ÂÂ!</font></p>
<center>
<font face=”Arial, geneva” size=”3″>
æ¨çÂÂé®件已åÂÂéÂÂè³<%= Recipient %><br>
<BR>
</font>
</center>
</body></html>
ÃÂ
ÃÂ
ÃÂ
[1]