1

I thought I could use:

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

but unfortunately the -a is unrecognised.

2 Answers 2

6

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: [email protected]
From: [email protected]
Subject: Example of conversation threading
In-reply-to: <put Message-ID of previous mail here>

Body text here
1

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: [email protected]
From: [email protected]
Subject: Example of conversation threading
In-Reply-To: <put Message-ID of previous mail here>

Body text here

This worked for me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .