天天看点

[asp]Jmail邮件发送方式

<%

Set jmail = Server.CreateObject("JMAIL.Message")'寤虹????????浠剁??瀵硅薄

'response.Write(sendFrom&"-"&sendTO&"-"&smtpserver&"-"&sendusername&"-"&sendpassword&"-"&subject&"-"&message&"-"&SendName)

jmail.silent = false '灞??戒?澶???璇?锛?杩???FALSE璺?TRUE涓ゅ??

jmail.logging = false '???ㄩ??浠舵?ュ?

jmail.Charset = "GB2312" '??浠剁????瀛?缂???涓哄?芥??

jmail.ContentType = "text/html" '??浠剁???煎?涓?TML?煎?

jmail.AddRecipient "[email?protected]" '??浠舵?朵欢浜虹???板??

jmail.From = "[email?protected]" '??浠朵汉??E-MAIL?板??

jmail.FromName = "gaingame" '??浠朵汉????瀛?

jmail.MailServerUserName = "gaingame" '?诲???浠舵???″?ㄦ???????ㄦ?峰??

jmail.MailServerPassword = "gaingame" '?诲???浠舵???″?ㄦ??????瀵???

jmail.Subject = "fine to see you friend" '??浠剁????棰?

jmail.Body="ddd" '??浠剁????瀹?

'jmail.Prority =1 '??浠剁??绱ф?ョ?搴?锛?1 涓烘??蹇?锛?5 涓烘????? 3 涓洪?璁ゅ??(??浣跨?ㄧ????w3jmail4涓??ラ??涓轰?涔?涓?娉ㄩ??姝ら」灏辨??????涓?????)

'jmail.Send("smtp.163.com") '?ц???浠跺????锛???杩???浠舵???″?ㄥ?板??锛?

if(not jmail.Send ("smtp.163.com")) then '????骞跺?ゆ??????????????

SendMail="<center>Fail to send the Email 2锛?</center>"

else

SendMail="<center>Success锛?</center>"

end if

response.Write(sendmail)

jmail.Close() '?抽??瀵硅薄%>