How to configure mailx to support Gmail?
The command mail -s "hello kid" [email protected]
is waiting for you to type the mail message and then control-d. After you do that the message will be sent. If you just want a quick test, do:
echo `date` this is a test | mail [email protected]
and the message will be sent immediately.
You can also redirect a file to mail.
Useful when sending mail via cron
mail -s "Logs" [email protected] < /var/log/auth.log