📄 sendmailok.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<%
set rs=server.CreateObject("adodb.recordset")
rs.Open "select mailaddress,mailusername,mailuserpass,mailname,mailsend from shop_config",conn,1,1
mailaddress=rs("mailaddress")
mailusername=rs("mailusername")
mailuserpass=rs("mailuserpass")
mailname=rs("mailname")
mailsend=rs("mailsend")
rs.close
set rs=nothing
'发送邮件
'if Forum_Setting(47)=1 then
on error resume next
'发送注册邮件
topic="来自朋友的推荐"
mailbody="<html>"
mailbody=mailbody & "<title>来自朋友的推荐</title>"
mailbody=mailbody & "<body>"
mailbody=mailbody & "<TABLE border=0 width='95%' align=center><TBODY><TR>"
mailbody=mailbody & "<TD valign=middle align=top>"
mailbody=mailbody & "尊敬的"&request("toname")&",您好:<br><br>"
mailbody=mailbody & "您的朋友"&request("fromname")&"[ "&request("fromaddr")&" mailto:"&request("toaddr")&"]!<br>"
mailbody=mailbody & "在我们的" & webname & "网站发现了一件"&request("bookname")&",特地向您推荐,希望是您比较喜欢或感兴趣的.<br><br>"
mailbody=mailbody & "您可以点击此处查看:<br>"
mailbody=mailbody & "<a href=http://"&weburl&"/list.asp?id="&request("bookid")&">http://"&weburl&"/list.asp?id="&request("bookid")&"</a><br>"
mailbody=mailbody & "<br>另外,您的朋友"&request("fromname")&"还想对您说:<br>"
mailbody=mailbody & "<br>"&request("body")&"<br>"
mailbody=mailbody & "<center><font color=red>欢迎您来" & webname & "网上商城!</font>"
mailbody=mailbody & "</TD></TR></TBODY></TABLE><br><hr width=95% size=1>"
mailbody=mailbody & "</body>"
mailbody=mailbody & "</html>"
Set JMail=Server.CreateObject("JMail.Message")
JMail.Charset="gb2312"
JMail.ContentType = "text/html"
jmail.from = mailsend
jmail.silent = true
jmail.Logging = true
jmail.FromName = mailname
jmail.mailserverusername = mailusername
jmail.mailserverpassword = mailuserpass
jmail.AddRecipient trim(request("toaddr"))
jmail.body=mailbody
JMail.Subject=topic
if not jmail.Send ( mailaddress ) then
SendMail=""
else
SendMail="OK"
end if
if SendMail="OK" then
sendmsg="<p>· 您的注册信息已经发往您的邮箱,请注意查收!</p>"
else
sendmsg="<p>· 系统出错,注册信息资料未能发送到您的邮箱!</p>"
end if
%>
<html>
<head>
<title>推荐给您的朋友</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
.css01 {FONT-SIZE: 7px; LINE-HEIGHT: 130%}
.css02 {FONT-SIZE: 10px; LINE-HEIGHT: 130%}
.css03 {FONT-SIZE: 12px; LINE-HEIGHT: 130%}
.css04 {FONT-SIZE: 14px; LINE-HEIGHT: 130%}
.css05 {FONT-SIZE: 16px; LINE-HEIGHT: 130%}
.css06 {FONT-FAMILY: 宋体; FONT-SIZE: 12px}
A:link {text-decoration: none; color: 000000}
A:visited{text-decoration: none; color: 000000}
A:active{text-decoration: none; color: ff0000}
A:hover{text-decoration: underline; color: aa0000}
.input {border-left: 1px solid rgb(80,102,70); border-right: 1px solid rgb(80,102,70); border-top: 1px solid rgb(80,102,70); border-bottom:1px solid rgb(80,102,70); font-size: 12px;background:#FFFFFF; font-weight: normal}
.style1 {color: #FFFFFF}
</style>
</head>
<script id=clientEventHandlersJS language=javascript>
<!--
function window_onload() {
window.moveTo(screen.availWidth-320,0)
window.focus();
}
//-->
</script>
<body bgcolor="#FFFFFF" topmargin="0" leftmargin="0">
<table width="350" border="0" cellspacing="0" cellpadding="0" class=css04 align="center">
<tr>
<td height="80"></td>
</tr>
<tr>
<td height="2" bgcolor="#CC6699"></td>
</tr>
<tr bgcolor="ADCBE7">
<td align="center" bgcolor="#CC6699"><font color="#0000FF">欢迎光临<%=webname%>网站</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="1" bgcolor="#FFFFFF"></td>
</tr>
<tr>
<td>
<table width="350" border="0" cellspacing="1" cellpadding="6" bgcolor="#CC6699" class=css04>
<tr>
<td bgcolor="#CCCCFF" height="80"> 信息:<%=sendmsg%><br>
谢谢您对<%=webname%>网站的支持,我们将会把此商品的详细内容发给您的朋友。 </td>
</tr>
<tr>
<td bgcolor="#CCCCFF" align="center"><a href="sendmail.asp?bookid=<%=request("bookid")%>&bookname=<%=request("bookname")%>"><u>继续推荐</u></a> <a href=# onClick="window.close();"><u>关闭窗口</u></a> </td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -