#!/usr//bin/expect
spawn telnet mail.domain.com 25
expect "220"
send "ehlo mail.domain.com
"
expect "HELP"
send "auth login
"
expect "334"
send "邮件用户名(base64编码)
"
expect "334"
send "密码(base64编码)
"
expect "235"
send "mail from:dominic.zhang@domain.com
"
expect "250"
send "rcpt to:jack@domain.com
"
expect "250"
send "data
From: : jack: test mail
HI,test
dominic's test
.
"
expect "250"
send "quit
"
阅读(2124) | 评论(3) | 转发(0) |