On Sat, Apr 02, 2016 at 10:18:28PM +0100, Larry Hynes wrote:
> Sat 02 Apr 2016 15:23 (-0400) Xu Wang <[email protected]>:
> > On Sat, Apr 2, 2016 at 2:39 PM, Larry Hynes <[email protected]> wrote:
> > > Sat 02 Apr 2016 12:02 (-0400) Xu Wang <[email protected]>:
> > > > On Sat, Apr 2, 2016 at 2:23 AM, Will Yardley 
> > > > <[email protected]> wrote:
> > > > > On Sat, Apr 02, 2016 at 01:19:12AM -0400, Xu Wang wrote:

> > > > > > Suppose that I have a full email (i.e. with headers and everything).
> > > > > > e.g. I want to keep the message ID the same. How can I used mutt's
> > > > > > build-in smtp to send the email? Basically i want mutt to just send
> > > > > > the email that is already written and not change any header.

> > > > > You can use 'bounce-message' (I think b with default bindings) to
> > > > > redirect the message to one or more recipients, though Mutt will add a
> > > > > few headers, most starting with 'Resent-' (Message-ID will stay the
> > > > > same).
> > > > > 
> > > > > You can use 'resend-message' (esc-e) to use the current message as a
> > > > > template for the new one, but Message-ID will change.

> > > > Thank you, Will. is there any way to send from command-line?

> > > Have you tried using mutt's '-H' option? e.g. `mutt -H draftfile`

> > That is great but I would like automation. I would like something like
> > mutt -s "Test from mutt" [email protected] < email_file
> > but something that works with just
> > mutt < email_file
> > and nothing else (because the subject and email address are already 
> > specified).

> echo | mutt -H email_file

This works (as does mutt -H - < email_file), but in my test, the
Message-ID is set by mutt, not from header input. So I think -H only
takes the headers that can be edited when $edit_headers is set.

So finding a way to use the <bounce-message> command without requiring
interaction, or just using Sendmail or similar is the best bet based on
your original request.

w

Reply via email to