终于弄出来了如何利用JMail发带身份认证的信件
看了JMail的帮助PDF,终于知道了如何发带SMTP身份认证的信:)
大家可以试一下,看看是不是真的是可以了:)
<% @ LANGUAGE = VBSCRIPT %>
<html>
<body>
<%
' Create the JMail message Object
set msg = Server.CreateOBject( "JMail.Message" )
' Set logging to true to ease any potential debugging
' And set silent to true as we wish to handle our errors ourself
msg.Logging = true
msg.silent = true
' Most mailservers require a valid email address
' for the sender
msg.From = "zhengxilong@hotmail.com"
msg.FromName = "Zheng Xilong"
' Next we have to add some recipients.
' The addRecipients method can be used multiple times.
' Also note how we skip the name the second time, it
' is as you see optional to provide a name.
msg.AddRecipient "cpplus@163.com", "His Name"
msg.AddRecipient "zxl@dahengit.com"
' The subject of the message
msg.Subject = "How you doin?"
msg.Body = "Hello Jim" & vbCrLf & vbCrLf & "How's it going? ..."
msg.MailServerUserName = "这里就是你的邮箱的用户名"
msg.MailServerPassWord = "这里是你的密码"
'也这样用msg.Send( "用户名:密码@SMTP服务器的地址" )
if not msg.Send("smtp.sina.com.cn") then
Response.write "<pre>" & msg.log & "</pre>"
else
Response.write "Message sent succesfully!"
end if
' And we're done! the message has been sent.
%>
</body>
</html>
可能有人早就知道了,
不过我昨天找了半天都没找到(其实是我苯:)
哈哈~