深圳市國通網企科技有限公司

+86-755-848 103 25

Jmail 發送郵件的例子1

所屬分類:網站程序發送郵件
發佈時間:2020-11-10
發佈者:網企科技
點擊量:13637


<%if request("action")="send" then%>
<%

'參數說明
'Subject : 郵件標題
'MailAddress : 發件服務器的地址,如smtp.163.com
'Email : 收件人郵件地址
'Sender : 發件人姓名
'Content : 郵件內容
'Fromer : 發件人的郵件地址

Sub SendAction(subject, email, sender, content)
 Set JMail = Server.CreateObject("JMail.Message")
 JMail.Charset = "gb2312" ' 郵件字符集,默認爲"US-ASCII"
 JMail.From = strMailUser ' 發送者地址
 JMail.FromName = sender' 發送者姓名
 JMail.Subject =subject
 JMail.MailServerUserName = strMailUser' 身份驗證的用戶名
 JMail.MailServerPassword = strMailPass ' 身份驗證的密碼
 JMail.Priority = 3
 JMail.AddRecipient(email)
 JMail.Body = content
 JMail.Send(strMailAddress)
End Sub

'調用此Sub的例子
Dim strSubject,strEmail,strMailAdress,strSender,strContent,strFromer
strSubject = Request("title")
strContent = "用戶Email:" & Request("From") & VbCrLf & "電話:" & Request("Tel") & VbCrLf & "內容:" & vbcrlf & Request("content")
strSender  = Request("Name")
strEmail = "anybody@163.com" '這是收信的地址,可以改爲其它的郵箱
strMailAddress = "mail.yourdomain.com" '我司企業郵局地址,請使用 mail.您的域名
strMailUser  = "user@yourdomain.com" '我司企業郵局用戶名
strMailPass  = "mailpassword" '郵局用戶密碼

Call SendAction (strSubject,strEmail,strSender,strContent)

%>


<%else%>




發郵件給我們
















郵件主題(title)*

姓名(name)

你的郵箱(mailaddress)*

電話(tel)
內容(content):*

  value="提交">

<%end if%>



Tag: 香港企業郵箱
上一篇:郵箱監控功能讓您撐控全局
下一篇:JMAIL組件問題集錦

外貿建站解決方案

歡迎您諮詢香港外貿建站和海外推廣業務

網站建設合作正式簽署,香港專業外貿網站建設策劃與網站開發執行,一站式外貿網站建設解決方案,助力外貿企業數字化轉型。

版權所有 ©深圳市國通網企科技有限公司 外貿建站專家
技術支持:外貿建站
免費獲得專屬《策劃方案》及報價諮詢



高端網站建設 · 品牌官網定製 · 集團網站開發 · 響應式網站
營銷型網站 · 外貿網站建設 · 網絡營銷推廣 · 企業郵箱 · 域名空間