About SendEmail
SendEmail is a lightweight, command line SMTP email client. If you have the need to send email from a command line, this free program is perfect: simple to use and feature rich. It was designed to be used in bash scripts, batch files, Perl programs and web sites, but is quite adaptable and will likely meet your requirements. SendEmail is written in Perl and is unique in that it requires NO MODULES. It has an intuitive and flexible set of command-line options, making it very easy to learn and use.
[Supported Platforms: Linux, BSD, OS X, Windows 98, Windows NT, Windows 2000, & Windows XP]

Download

Official Release:sendEmail-v1.55.tar.gz   (27kb Dec 13th, 2006)   Changelog   Screen Shot

Windows Executable:
Free sendEmail.exe for Windows. To use simply run sendEmail.exe from a console / command line.
sendEmail-v155.zip   (1.4mb Dec 21st, 2006)   TLS supported
sendEmail-v155-notls.zip   (674kb Dec 21st, 2006)   No TLS support

RPM Package:sendEmail rpm

本日志由 flyinweb 于 2009-06-22 10:26:00 发表到 WEB应用开发 中,目前已经被浏览 339 次,评论 0 次;

作者添加了以下标签: PERLMail

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

    在linux下有一个mail命令可以用来收发邮件,但是默认情况下邮件的发送人为当前用户,有时候为了方便的在程序(比如perl脚本)中发送邮件,那么就得指定特定的发送人,这个怎么办呢?在正常的发送命令后面追加" -- -f 发送人邮件 -F 发送人姓名"即可,一个简单的实际例子如下:

  1. $ mail -s "just a test" 收信人邮箱地址 < 要发送的邮件内容文件 -- -f 发送人邮件地址 -F 发件人姓名 


效果是: 信件内容将发送给 收信人邮箱,显示的发送人为 发送人姓名<发送人邮件地址>,显示的内容为 发送的邮件内容...

 

  1. /bin/mail -s "Disk Used Information" wsy@114.com.cn < /home/kkg/alarm.log 

发送人为:root@localhost.localdomain或者是root@hostname

  1. $ /bin/mail -s "Disk Used Information" wsy@517sou.net < /home/kkg/alarm.log -- -f wsy@517sou.net -F wsy 

发件人:wsy@517sou.net

说明:
-- 后面部分是传给 sendmail 这类 mta 的参数。

本日志由 flyinweb 于 2009-06-22 10:13:36 发表到 Linux 中,目前已经被浏览 547 次,评论 0 次;

作者添加了以下标签: linuxmail