?? email_sendsave.asp
字號:
<!--#include file=DataBase/conn.asp-->
<!--#include file=config.asp-->
<%
if request("SendName")="" then '驗證發件人是否為空
response.Write("<script language=javascript>alert('發件人不能為空,請添加');location='javascript:history.go(-1)'</script>")
response.End()
end if
'從數據庫中讀取發見人的信息
set rs=server.CreateObject("adodb.recordset")
sql="select * from tb_Addresser where id="&request("SendName")
rs.open sql,conn,1,1
if not rs.eof then
Emails=Split(Request("ClientName"),",") '把字符轉換成數組
for i=0 to ubound(emails)
Set msg = Server.CreateObject("JMail.Message")
msg.silent = true
msg.Logging = true
msg.Charset = "gb2312"
msg.MailServerUserName =rs("Email") '輸入smtp服務器驗證登陸名 (郵局中任何一個用戶的Email地址)
msg.MailServerPassword = rs("EmailPwd") '輸入smtp服務器驗證密碼 (用戶Email帳號對應的密碼)
msg.From =rs("Email") '發件人Email
msg.FromName = rs("EmailName")'發件人姓名
msg.AddRecipient(emails(i)) '收件人Email
msg.Subject = request("title") '信件主題
msg.Body = request("content") '正文
msg.Send (rs("SmtpEmail")) 'smtp服務器地址(企業郵局地址)
set msg = nothing
next
response.Write "<br>"
response.Write "發送成功??!"
else
response.Write("<script languaeg=javascript>alert('發件人不存在');location='javascript:history.go(-1)'</script>")
end if
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -