On Sun, Apr 03, 2016 at 12:09:02AM +0100, Larry Hynes wrote: > Sat 02 Apr 2016 18:30 (-0400) Xu Wang <[email protected]>: > >On Sat, Apr 2, 2016 at 5:18 PM, Larry Hynes <[email protected]> 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? For > >>>>>example, I have a file like following: > >>>> > >>>> > >>>> > >>>>Have you tried using mutt's '-H' option? e.g. `mutt -H draftfile` > >>>>You will find it documented in the man page. > >>> > >>> > >>>Thank you for reply. > >>> > >>>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 > > > >That works! How does that work? From what I understand, that means > >that an empty line is piped to mutt -H email_file. How does mutt know > >to interpret that? Is this documented anywhere? > > cat email_file | mutt -H - > > will also work. I assume mutt recognises when input is from stdin and does not > behave interactively but that's just a lazy theory of mine.
In that case, then this ought to work too (not tested), and it avoids the "useless use of cat": mutt -H - < email_file -- ---- Fred Smith -- [email protected] ----------------------------- God made him who had no sin to be sin for us, so that in him we might become the righteousness of God." --------------------------- Corinthians 5:21 ---------------------------------
