使用SendEmail在命令行发送邮件
作者 佚名技术
来源 Linux系统
浏览
发布时间 2012-03-26
ions --help misc explain -o options, TLS, SMTP auth, and more --------------- Examples --------------- Simple Email: sendEmail -f me@gmail.com \ -t friend@yahoo.com \ -s smtp.gmail.com:587 \ -xu me@gmail.com \ -xp MY-PASSWORD \ -u "Test email" \ -m "Hi buddy, this is a test email." Sending to mutiple people: sendEmail -f myaddress@isp.net \ -t "Scott Thomas <scott@isp.net>" jason@isp.net renee@isp.net \ -s relay.isp.net \ -u "Test email" \ -m "Hi guys, this is a test email." Sending to multiple people using cc and bcc recipients: (notice the different way I specified multiple To recipients, you can do this for cc and bcc as well) sendEmail -f myaddress@isp.net \ -t scott@isp.net;jason@isp.net;renee@isp.net \ -cc jennifer@isp.net paul@isp.net jeremiah@isp.net \ -bcc troy@isp.net miranda@isp.net jay@isp.net \ -s relay.isp.net \ -u "Test email with cc and bcc recipients" \ -m "Hi guys, this is a test email." Sending to multiple people with multiple attachments: sendEmail -f myaddress@isp.net \ -t jason@isp.net \ -cc jennifer@isp.net paul@isp.net jeremiah@isp.net \ -s relay.isp.net \ -u "Test email with cc and bcc recipients" \ -m "Hi guys, this is a test email." \ -a /mnt/storage/document.sxw "/root/My Documents/Work Schedule.kwd" Sending an email with the contents of a file as the message body: cat /tmp/file.txt | sendEmail -f myaddress@isp.net \ -t jason@isp.net \ -s relay.isp.net \ -u "Test email with contents of file" Sending an email with the contents of a file as the message body (method 2): sendEmail -f myaddress@isp.net \ -t jason@isp.net \ -s relay.isp.net \ -o message-file=/tmp/file.txt \ -u "Test email with contents of file" Sending an html email: (make sure your html file has <html> at the beginning) cat /tmp/file.html | sendEmail -f myaddress@isp.net \ -t jason@isp.net \ |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
关于使用SendEmail在命令行发送邮件的所有评论