Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

been searching for few hours, and came to no solution.

Is there an equal expression for the bash command

myfile | sendmail -t

where my information needed for sending mails is stored in the "myfile" ?

share|improve this question

migrated from Nov 21 '12 at 13:58

This question came from our site for professional and enthusiast programmers.

Is myfile an executable, or do you mean to do <myfile sendmail -t? – William Pursell Nov 21 '12 at 9:03
myfile is a textfile containing information as : 'From:' and 'Subject: MySubject' – Yunalescar Nov 21 '12 at 9:10

You don't specify your OS: On my Ubuntu system, /usr/bin/mail is redirected to /usr/bin/heirloom-mailx which has a -t option

  -t     The message to be sent is expected to contain a  message  header
         with  `To:',  `Cc:',  or  `Bcc:'  fields  giving its recipients.
         Recipients specified on the command line are ignored.

share|improve this answer
i have a Debian Squeeze running the simple mailutil as far as i know. – Yunalescar Nov 21 '12 at 12:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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