终于弄出来了如何利用JMail发带身份认证的信件

cpplus 2002-05-24 05:15:40
看了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>

可能有人早就知道了,

不过我昨天找了半天都没找到(其实是我苯:)

哈哈~
...全文
157 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
lovingkiss 2002-05-24
  • 打赏
  • 举报
回复
你的附件呢?

http://www.csdn.net/expert/topic/736/736659.xml?temp=8.074588E-02

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧