Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I thought I could use:

mail -s "Subject_here" -a "In-Reply-To: Message_ID_here" < body

but unfortunately the -a is unrecognised.

share|improve this question

2 Answers 2

I think -a for additional header does not work in case you mail command is Heirloom mailx. In Heirloom mailx -a flag is for file attachment. As you answered to yourself, you can use sendmail, but you can also use -t flag to Heirloom mailx, too.

mail -t < body

The body text is same as that of your own answer.

To: bob@example.com
From: tim@example.com
Subject: Example of conversation threading
In-Reply-To: <put Message-ID of previous mail here>

Body text here

This worked for me.

share|improve this answer
up vote 2 down vote accepted

I found this way of using sendmail instead:

/usr/lib/sendmail -t < body

The file body should have each header on a separate line, then a blank line, then your message body text:

To: bob@example.com
From: tim@example.com
Subject: Example of conversation threading
In-reply-to: <put Message-ID of previous mail here>

Body text here
share|improve this answer

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.