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" myemail@e.mail.com 

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 – Lev Bystritskiy Mar 15 '16 at 4:58
  • @LevBystritskiy Do I need to setup any smtp ? – Edmhar Mar 15 '16 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/… – Lev Bystritskiy Mar 15 '16 at 5:31

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.