您的位置:首页 > 其它

关于REBOL发邮件的研究

2007-09-23 18:27 127 查看
相信没多少人听说过REBOL,不过确实感觉是一种不错的语言,使用中有一点不大合意就是发邮件,大多服务器都对SMTP要求验证,这个功能它却没有,所以自己弄了一个,以纯TCP的方式发邮件。成功了!
REBOL [Title:"ESMTP"]
s: open/lines tcp://SMTP服务器地址:25
print first s
insert s "HELO 你的邮箱"
print first s
insert s "AUTH LOGIN"
print first s
insert s enbase "用户名"
print first s
insert s enbase "密码"
print first s
insert s "MAIL FROM:<发件人邮箱>"
print first s
insert s "RCPT TO:<收件人邮箱>"
print first s
insert s "DATA"
insert s "subject: 测试"
insert s read %m.eml;(邮件文件)
insert s "."
print first s
insert s "QUIT"
print first s
close s
halt
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: