aspemail組件的應(yīng)用
|
admin
2010年7月7日 23:29
本文熱度 5468
|
sub sendmail(a_intid , a_stremail)[br]const c_strmailserver = "smtp.163.net"[br]dim objconn,objrs,strsql[br]dim strcontent,strbody,strsubject,objemail strbody = " " [br]strbody = strbody + " " [br]strbody = strbody + ""[br]strbody = strbody + " " + "請您確認(rèn)" + "" + vbcrlf[br]strbody = strbody + "" + "您好"&a_stremail&"" + " | " + vbcrlf[br]strbody = strbody + "" + "歡迎您訂閱萬里信息網(wǎng)郵件列表" +""[br]strbody = strbody + "
" + "為了防止出現(xiàn)訂閱錯誤,請您點(diǎn)擊以下鏈接進(jìn)行確認(rèn)。謝謝!" + ""[br]strbody = strbody + "
" + "" + "請點(diǎn)擊這里,進(jìn)行訂閱確認(rèn)" + ""[br]strbody = strbody + "
" + vbcrlf[br]strbody = strbody + "
"[br]strbody = strbody + "
" + "歡迎再次光臨萬里信息網(wǎng)!" + ""[br]strbody = strbody + ""
'發(fā)送email[br]on error resume next[br]set objemail = server.createobject("persits.mailsender") [br]objemail.host = c_strmailserver[br]objemail.from = "[url=mailto:jiabaoxu@163.net]jiabaoxu@163.net[/url]" [br]objemail.fromname = "china-168.net"[br]objemail.addaddress a_stremail[br]objemail.subject = "訂閱確認(rèn)" [br]objemail.ishtml = true [br]objemail.charset = "gb2312"[br]objemail.body = strbody[br]objemail.send
'檢察錯誤[br]if err.number = 0 then '如果成功[br]response.write ("
為確保用戶不被騷擾,我們將發(fā)出確認(rèn)信,請?jiān)L問信中的url以確認(rèn)登記")[br]else '如果失敗則顯示出錯原因[br]response.write ("
郵件發(fā)送出錯,錯誤原因:
")[br]response.write (""&err.description&"") [br]end if
'清場[br]set objemail = nothing[br]end sub
使用該過程:[br]<%[br].....
rtsemail guestmailid,""&email&""[br].....
%>
該文章在 2010/7/7 23:29:48 編輯過
|