一.sendmail和sendEmail区别

sendmail是一款邮件服务器软件(MTA),sendEmail是命令行SMTP邮件客户端(MUA)

二.senEmail安装

下载地址:http://caspian.dotconf.net/menu/Software/SendEmail/sendEmail-v1.56.tar.gz

#sendEmail解压后即可使用
wget http://caspian.dotconf.net/menu/Software/SendEmail/sendEmail-v1.56.tar.gz -P /download
tar xf /download/sendEmail-v1.56.tar.gz -C /download/tmp
cp /download/tmp/sendEmail-v1.56/sendEmail /usr/local/bin/

测试能否成功发送邮件

/usr/local/bin/sendEmail -f "xiami@qsquant.com" -t "26?????877@qq.com" -s "smtp.mxhichina.com" -u "myTest" -o message-content-type=html -o message-charset=utf-8 -xu "xiami@qsquant.com" -xp "Q????234@" -m "hello,this is the test contents"
#成功后提示下列内容
Aug 24 14:50:26 sysqsquantop009 sendEmail[12003]: Email was sent successfully!

*163邮箱、qq邮箱默认没有开启pop3/smtp/imap服务,若发件端为163或qq,执行将会出错,请先开启pop3/smtp/imap服务后再尝试

命令说明

/usr/local/bin/sendEmail 命令主程序
-f ttlsafrom@163.com  发件人邮箱
-s smtp.163.com       发件人邮箱的smtp服务器
-u "我是邮件主题"     邮件的标题
-o message-content-type=html   邮件内容的格式,html表示它是html格式
-o message-charset=utf8        邮件内容编码
-xu ttlsafrom@163.com          发件人邮箱的用户名
-xp 123456               发件人邮箱密码
-m "我是邮件内容"        邮件的具体内容

--help          使用命令帮助
命令说明

相关文章:

  • 2022-02-10
  • 2022-12-23
  • 2022-01-26
  • 2021-10-06
  • 2021-11-25
  • 2021-05-03
  • 2021-07-08
猜你喜欢
  • 2022-01-04
  • 2021-09-23
  • 2022-12-23
  • 2021-09-29
  • 2022-12-23
  • 2022-01-08
  • 2021-04-07
相关资源
相似解决方案