mess.thml頁面:
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>..::駛向天邊-網頁設計-::.. jmail提交郵箱代碼測試</title>
<link rel="stylesheet" type="text/css" href="
http://www.at63.com/p_w_picpaths/css.css">
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
color: #20707d;
line-height:22px;
font-family:Verdana, Arial, Helvetica, sans-serif;
}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background:url(p_w_picpath/bg.jpg);
background-position:center;
}
*{ margin:0; padding:0; border:0;}
html,body { height:100%;}
a:link {
color: #20707d;
text-decoration:none
}
a:visited {
color: #20707d;
text-decoration:none
}
a:hover {
color: #2F99D2;
text-decoration:none
}
a:active {
color: #20707d;
text-decoration:none
}
.top{margin:0 auto; width:800px;background:#FFFFFF; height:100%;}
.logo{margin:0px 5px 0px 5px; background: url(p_w_picpath/MAIN_04.gif) repeat-x; height:87px; width:790;}
.logoleft{float:left; height:87px;}
.logoright{float:right;text-align:right; padding-right:10px;}
.searchinput{border:medium none; background-color:transparent; font-family:Verdana, Arial, Helvetica, sans-serif; width:152px; height:27px; font-size:14px; line-height:28px; color:#20707d;}
.pagediv{margin:0px 5px 0px 5px; height:100%}
.pagemenu{ width:227px; height:100%; float:left; height:100%;}
.pagemenu0{ float:left; width:7px;}
.pagemenu1{float:left; width:556px;background-color:#FFFFFF}
.menuleft{padding-left:30px;}
.foot{height:30px; background:#20707d;width:790px;margin:0px 5px 0px 5px; color: #EEFBFF; text-align: right;}
.footdiv{height:30px; background:#fff; width:790px;}
.content{width:530px;padding:0px 10px 0px 10px; text-align: left;}
.title{width:530px;padding:10px 10px 0px 10px;text-align:right; font-family:Arial, Helvetica, sans-serif;}
.gcimg{float:left; width:33%; text-align:center; height:120px; overflow:hidden; margin:0 auto;}
.input3{border:1px #CCCCCC solid; font-family: Verdana, Arial, Helvetica, sans-serif;}
.button{border:1px #CCCCCC solid; font-size:12px; background: #E8F4F4; color: #006666; font-family:Verdana, Arial, Helvetica, sans-serif; height:20px; line-height:20px;}
.ListTitle{border-bottom:1px #5FA5D8 dashed;}
.left{padding-left:10px;}
.gctxt{float:left; width:33%; text-align:center;margin:0 auto;}
.subbg{ background:url(p_w_picpath/MAIN_25.gif) no-repeat center; height:191px; width:556px;}
-->
</style>
</head>
jmail.asp頁面:
<%
dim sendemail,jmail,tHtml,Subject,content,at63
Subject=trim(request.form("Subject"))
tHtml=trim(request.form("tHtml"))
sendemail=trim(request.form("sendemail"))
Set JMail = Server.CreateObject("Jmail.Message")
JMail.From = "
daigua2102@163.com"
'來自哪果發送
JMail.FromName = "客戶反饋"
'發送名
JMail.CharSet = "GB2312"
JMail.Priority = 3
JMail.ReplyTo = "
daigua2102@163.com"
'回覆email
JMail.AddRecipient sendemail
JMail.Subject = Subject
JMail.AppendText "客戶反饋"
content = "<link rel=""stylesheet"" type=""text/css"" href=""
http://www.at63.com/send/css.css"">"
content=content & thtml
'thtml變量是整個表單的html代碼,表單設置的文本字段<input name="sendemail" type="text" class="input3" id="sendemail" size="20" />,提交時用innerHTML獲取表單html代碼
JMail.AppendHTML content
JMail.MailServerusername = "
daigua2102@163.com" '服務郵箱地址 JMail.MailServerPassword = "4722188" '服務郵箱密碼.郵箱密碼是正確的.用來演試的.請不要修改個人修改,謝謝合做 if (JMail.Send ("smtp.163.com")) then 'JMail.Send 發送服務器 response.write "<script>alert('發送成功!');history.back(-1);</script>" else response.write "<script>alert('企業郵箱服務器出現問題.發送失敗!');history.back(-1);</script>" end if %>