Good Day, I'm still new in Linux CLI and I'm using RHEL 6. I'm executing command for sending email via terminal.

$ cat log.txt | mail -s "Logs" [email protected] 

Hosted by outlook365

When I try this command, nothing happens. No errors but nothing happens.

Any tips?

Thank you.

  • command is correct, you should check logs for errors Mar 15, 2016 at 4:58
  • @LevBystritskiy Do I need to setup any smtp ?
    – Edmhar
    Mar 15, 2016 at 5:17
  • 1
    Usually no, but may be you mail is blocked by external server (that's why logs needed), also you can setup external server for this - check unix.stackexchange.com/questions/36982/… Mar 15, 2016 at 5:31

1 Answer 1


Check the /var/log/maillog to see the logs related to the email being sent. Are the logs logging any errors?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .