Jmail ·¢ËÍÓʼþµÄÀý×Ó2
<%@ Language=VBScript %>
<%
"==================================================
" ²Î Êý Éè ÖÃ
"==================================================
"ÐÞ¸ÄÊÕÐÅÈ˵ç×ÓÓʼþµØÖ·£¬±íµ¥ÀïµÄÄÚÈݽ«·¢Ë͵½Õâ¸öÐÅÏäÖÐ
myemail ="test@test.com"
"ÐÞ¸ÄÊÕÐÅÈËÐÕÃû
myname ="ÎҵĹ«Ë¾"
"ÐÞ¸ÄSMTP·þÎñÆ÷
smtpserver ="mail.test.com"
"ÐÞ¸ÄSMTP·þÎñÆ÷µÄÓû§ÃûºÍÃÜÂë
smtpuser ="test@test.com"
smtppwd ="123456"
"ÓëÏàÓ¦SMTP·þÎñÆ÷¶ÔÓ¦µÄÓʼþµØÖ·
"ºÜ¶àSMTP·þÎñÆ÷³ýÁËÒªÑéÖ¤Óû§ÃûºÍÃÜÂëÍ⣬»¹ÒªÑéÖ¤·¢¼þÈ˵ØÖ·£¬
"±ÈÈç163.netµÄSMTP·þÎñÆ÷ÔÚ¼ì²é·¢ÐÅÈËÓʼþµØÖ·ÊDz»ÊÇÒÔ163.net
"½á⣬·ñÔò²»Óè·¢ËÍ£¬Òò´Ë£¬Ê¹ÓÃÏàÓ¦µÄÐÅÏä×öΪ·¢ÐÅÈËÐÅÏäÊDZØÒªµÄ
smtpemail ="test@test.com"
"==================================================
" ³Ì Ðò ¿ª ʼ
"==================================================
tname =Request("t1")
temail =Request("t2")
tother =Request("t3")
tsubject =Request("t4")
tbody =Request("t5")
if tname <> "" and temail <> "" then
set jmail=server.CreateObject ("jmail.message")
jmail.Silent =true
jmail.Charset ="gb2312"
if smtpemail <> "" then
jmail.From ="test@test.com"
else
jmail.From =temail
end if
jmail.FromName =tname
jmail.ReplyTo =temail
jmail.Subject ="ÍøÉÏÌá½»£º" & tsubject
jmail.Body =tbody & vbcrlf & vbcrlf & "ÁªÏµ·½Ê½£º" & tother
jmail.AddRecipient myemail,myname
jmail.MailServerUserName =smtpuser
jmail.MailServerPassWord =smtppwd
isgo=jmail.Send(smtpserver)
if isgo then
msg="Ìá½»³É¹¦£¡Ð»Ð»ÄúµÄÖ§³Ö¡£"
else
msg="·¢ËÍʧ°Ü£¡Çë¼ì²éÄúµÄÓʼþµØÖ·ÊÇ·ñÌîдÕýÈ·¡£"
end if
jmail.Close
set jmail=nothing
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>ÓëÎÒ˾ÁªÏµ</title>
</head>
<style type="text/css">
<!--
body,input,textarea{font-size: 12px}
-->
</style>
<body>
<form action=jmail.asp><%=msg%>
<br>ÄúµÄÐÕÃû£º
<br><input name=T1 size=29>
<br>µç×ÓÓʼþ£º
<br><input name=T2 size=29>
<br>ÁªÏµ·½Ê½£º
<br><input name=T3 size=29>
<br>ÎÄÕÂÖ÷Ì⣺
<br><input name=T4 size=29>
<br>ÎÄÕÂÕýÎÄ£º
<br><textarea rows=6 cols=28 name=T5>
</textarea>
<br><input type="submit" value="È·¶¨">
</form>
</body></html>