How to send mail from linux shell as another user

Discussion in 'HOWTO-Related Questions' started by dpicella, Aug 14, 2010.

  1. dpicella

    dpicella New Member

    Using the root account, I would like to send some routine emails to my users from the shell using a different default email so that if a user replies it does not go to root@myhostingdomain

    I recently changed from Fedora to Cent OS. I noticed the "mail" command in CentOS does not have to -r option that is available in Fedora.

    # man mail
    Is there a better way to do this?
  2. BorderAmigos

    BorderAmigos New Member

    You could do it with the php mail command. Set up a small php script that sends your mails then run it from the command line.

Share This Page