<% Title="welcome you to Killerj.tK" ToWho="[email protected]" Content="吼吼,jmail测试" call SendMyEmail(Title,ToWho,Content) Sub SendMyEmail(Title,ToWho,Content) Dim msg Dim email_server,user_name,password,Email_type,send_email email_server = "smtp.163.com" user_name = "[email protected]" password = "********" Email_type = 1 send_email = "killerJ" Set msg=Server.CreateObject("JMail.Message") msg.Body = "" msg.HTMLBody = "" '--- msg.appendtext(Content)
if user_name<>"" and password<>"" then msg.MailServerUserName = user_name msg.MailServerPassword = password end if if ToWho<>"" then msg.ReplyTo=ToWho '-- msg.Logging = True msg.silent = true msg.Charset = "so-8859-1" msg.From = user_name msg.FromName = send_email msg.Subject = Title '-- msg.AddRecipient ToWho msg.Priority=Email_type err=msg.Send (email_server) '--- msg.clear msg.close Set msg=nothing End Sub %>这个是我昨天测试成功的一个jmail程序
采用CDONTs 或者 Jmail 或者 ASPMail
等等组件~
Title="welcome you to Killerj.tK"
ToWho="[email protected]"
Content="吼吼,jmail测试"
call SendMyEmail(Title,ToWho,Content)
Sub SendMyEmail(Title,ToWho,Content)
Dim msg
Dim email_server,user_name,password,Email_type,send_email email_server = "smtp.163.com"
user_name = "[email protected]"
password = "********"
Email_type = 1
send_email = "killerJ" Set msg=Server.CreateObject("JMail.Message") msg.Body = ""
msg.HTMLBody = ""
'---
msg.appendtext(Content)
if user_name<>"" and password<>"" then
msg.MailServerUserName = user_name
msg.MailServerPassword = password
end if
if ToWho<>"" then msg.ReplyTo=ToWho
'--
msg.Logging = True
msg.silent = true
msg.Charset = "so-8859-1"
msg.From = user_name
msg.FromName = send_email
msg.Subject = Title
'--
msg.AddRecipient ToWho
msg.Priority=Email_type
err=msg.Send (email_server)
'---
msg.clear
msg.close
Set msg=nothing
End Sub
%>这个是我昨天测试成功的一个jmail程序
<script language="javascript">
<a href="mailto:[email protected]">发邮件</a>
</script>