使用expect自动发送邮件的脚本
spawn telnet mail.domain.com 25
expect "220"
send "ehlo mail.domain.com "
send "auth login "
send "邮件用户名(base64编码) "
send "密码(base64编码) "
send "mail from:dominic.zhang@domain.com "
send "rcpt to:jack@domain.com "
send "data From: dominic.zhang@domain.com To: jack@domain.com Date: Subject: test mail HI,test dominic's test . "
send "quit "