Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com 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: me@myserver.org' and 'Subject: MySubject' –  Yunalescar Nov 21 '12 at 9:10

1 Answer 1

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.

http://manpages.ubuntu.com/manpages/precise/en/man1/heirloom-mailx.1.html

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

 
discard

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.