How to send out email through Linux command line or Windows

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


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

2. use Mutt command:
[jephe@app1 ~]$ more .muttrc
set from=""
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 < /dev/null

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

3. use email (
or ssmtp (install EPEL < > then yum install ssmtp)
or msmtp ( (msmtp is recommended),
or mailsend ( )

4. Windows command line email client