SendEmail on Linux – Send SMTP Mail from the Command Line

SendEmail is a lightweight, command line SMTP email client. It was designed to be used in bash scripts, batch files, Perl programs and web sites, but is quite adaptable. SendEmail is written in Perl and requires no modules. SendEmail is licensed under the GNU GPL, either version 2 of the License or (at your option) any later version. Although it is supported by Linux, BSD, OS X, Windows 98, Windows NT, Windows 2000, & Windows XP, the main focus for this article is the Linux platform, specifically CentOS 5.4 and RHEL 5.4.

Download SendEmail


Extract it

tar -zxvf sendEmail-v1.56.tar.gz

Copy the sendEmail script to /usr/local/bin

cp -a sendEmail-v1.XX/sendEmail /usr/local/bin

Make it executable

chmod +x /usr/local/bin/sendEmail

Run it




Running sendEmail without any arguments will produce a usage summary.


SendEmail is written in Perl, so no compilation is needed.
On a Unix/Linux OS if your perl binary is not installed at /usr/bin/perl you may need to edit the first line of the script accordingly.

There is a README file included with this package, read it, it has usage examples.