å¦Âä½Â使ç¨表åÂÂÃ¥ÂÂéÂÂçµåÂÂé®件ï¼Â
formToEmail.htmxml:namespace prefix = o ns = “urn:schemas-microsoft-com:office:office” /??
‘ 表åÂÂ.
<FORM METHOD=”POST” ACTION=”formToEmail.asp”>
<P>
æ¶件人: <INPUT SIZE=30 NAME=”recipient” MAXLENGTH=200>
<P>
Ã¥ÂÂ件人: <INPUT SIZE=30 NAME=”sender” MAXLENGTH=200>
<P>
主é¢Â: <INPUT SIZE=30 NAME=”subject” MAXLENGTH=512>
<P>
Ã¥ÂÂ
容ä¸Â: <TEXTAREA ROWS=2 COLS=60 NAME=”messageline1″> </TEXTAREA>
<P>
Ã¥ÂÂ
容äºÂ: <TEXTAREA ROWS=2 COLS=60 NAME=”messageline2″> </TEXTAREA>
</PRE>
<INPUT TYPE=submit VALUE=”Ã¥ÂÂé“>
formToEmail.asp
‘ å¤ÂçÂÂæÂ¥æ¶åÂÂÃ¥ÂÂéÂÂé®件.
<%
Set mailer = Server.CreateObject(“ASPMAIL.ASPMailCtrl.1”)
recipient = Request.Form(“recipient”)
sender = Request.Form(“sender”)
subject = Request.Form(“subject”)
message = Request.Form(“messageline1”)
message = message & vbCRLF
message = message & vbCRLF
message = message & Request.Form(“messageline2”)
mailserver = “www.intels.net”
‘ Ã¥ÂÂä¸Âé®件æÂÂå¡å¨.
result = mailer.SendMail(mailserver, recipient, sender, subject, message)
%>
<% If “” = result Then %>
æÂÂÃ¥ÂÂ,é®件åÂÂéÂÂæÂÂÃ¥ÂÂ!
<% Else %>
æ±æÂÂ,é®件åÂÂéÂÂ失败!
<H2>
<%= result %>
</H2>
<% End If %>
[1]