<%
Function SendMail(MailtoAddress,MailtoName,Subject,MailBody,FromName,MailFrom,Priority)
on error resume next
Dim JMail
Set JMail=Server.CreateObject("JMAIL.Message")
if err then
SendMail= "
沒有安裝JMail組件"
err.clear
exit Function
end if
JMail.Charset="big5" '郵件編碼
'JMail.silent=true
JMail.ContentType = "text/html" '郵件正文格式
jmail.ISOEncodeHeaders = false
JMail.ServerAddress="smtp.keynet-hk.com" '用來發郵件的SMTP服務器
'如果服務器需要SMTP身份驗證則還需要指定以下參數
JMail.MailServerUserName = "hk-printing" '登錄用戶名
JMail.MailServerPassWord = "u83tEH4" '登錄密碼
'JMail.MailDomain = "419644761@qq.com"
JMail.AddRecipient MailtoAddress,MailtoName '收信人
JMail.AddRecipient "cychen@hk-printing.com.hk","Sales" '"419644761@qq.com","Sales"'
JMail.Subject=Subject '主題
JMail.HMTLBody=MailBody '郵件正文(html格式)
JMail.Body=MailBody '郵件正文(純文本格式)
JMail.FromName=FromName '發信人姓名
JMail.From = MailFrom '發信人Email
JMail.Priority=Priority '郵件等級, 1為加急,3為普通,5為低級
JMail.Send("smtp.keynet-hk.com")
SendMail =JMail.ErrorMessage
JMail.Close
Set JMail=nothing
End Function
totalprice=Trim(request("total"))
orderid=Trim(request("oid"))
'==================================郵件發送程序
actionflag=Trim(request.QueryString("actionflag"))
if actionflag="send" then
username=Trim(request("username"))
comCname=Trim(request("comCname"))
comEname=Trim(request("comEname"))
tel=Trim(request("tel"))
Email=Trim(request("Email"))
Fax=Trim(request("Fax"))
websit=Trim(request("websit"))
content=Trim(request("content"))
strSubject = "客戶"&username&"報價質詢"
MailBody ="客戶姓名: "&username&"
Please fill in below form if you cannot find your product from the list. We will contact with you as soon as possible when we get your inquiry.(Fields marked * cannot leave blank)