How to send out email through Linux command line or Windows

Environment: RHEL servers
Objective: sending email directly from Linux CLI


Methods:

1. use Sendmail command:
(echo "From: jephe.wu@domain.com";echo "To: recipient@domain.com";echo "Subject: testing";echo "";cat filename) | /usr/sbin/sendmail -v jephe.wu@domain.com


2. use Mutt command:
[jephe@app1 ~]$ more .muttrc
set from="app1@domain.com"
set envelope_from=yes

note: or put above .muttrc to /etc/Muttrc

edit /home/jephe/.muttrc as above , then send like this:
$ mutt -a /etc/hosts jephe.wu@domain.com < /dev/null

note: you can man muttrc:
$ export LANG=en-US
$ man muttrc

3. use email (email.cleancode.org)
or ssmtp (install EPEL < http://fedoraproject.org/wiki/EPEL > then yum install ssmtp)
or msmtp (http://msmtp.sourceforge.net/) (msmtp is recommended),
or mailsend (http://www.muquit.com/muquit/software/mailsend/mailsend.html )
or http://untroubled.org/nullmailer/

4. Windows command line email client
http://www.blat.net/