Multiple Headers for Mutt Command
Asked Answered
R

1

6

I want to set two headers for mutt command. Here is what I am using.

mutt -s "Subject" -e "my_hdr From:[email protected] Content-Type: text/html" [email protected] < body.html

But it doesn't work. How can I set multiple headers with -e option?

Rus answered 26/11, 2012 at 14:56 Comment(0)
C
12

Use multiple -e options:

mutt -s "Subject" \
  -e "my_hdr From: [email protected]" \
  -e "my_hdr Content-Type: text/html" \
  [email protected] < body.html
Clipclop answered 26/11, 2012 at 15:28 Comment(4)
Oh how dumb of me. I should have seen that. Let me try that as well. I think it will work.Rus
Hey that worked, but I am facing new issue now. The files which I am attaching are now part of the email body only. Any ideas about that?Rus
Mutt really wasn't intended to be used to send messages like that, it's meant to be used interactively. It has some features for building up messages from the command line, but there are many things that it can't do. If you need to programmatically send complex messages you should look for a tool which was meant for that type of use.Clipclop
Yeah thanks. Attachments and HTML emails doesn't work together in mutt. I moved that section to PHP mail and it works fine. Thanks for the clarification.Rus

© 2022 - 2024 — McMap. All rights reserved.