Mutt, send email without saving it to Sent folder
Asked Answered
A

2

6

I can manage to send email and save a copy using Mutt with its own ui.

mutt -s topic receiver

This will bring up mutt's interface to edit and send mail. It will first upload to imap server, and send the email through smtp server. There is a Fcc field in the header.

But When I use pure command line to send mail, say:

mutt -s topic receiver < foo

The mail is successfully sent, but no copy in my server's sent folder. I check the debug log, the mail is not uploaded to imap server at all, just sent through smtp server.

I have tried to use my_hdr, but Fcc is not supported to be set.

fcc-hook is also tried, not use

Ammonite answered 18/2, 2014 at 17:15 Comment(0)
P
3

Have you tried putting the line

set record=+accountname/sent

into your .muttrc? i.e. where accountname is whatever you're calling your account and sent is the name of the sent emails mailbox, e.g. what I have in my .muttrc is

set record = +mec07/"Sent Items"

This command saves all the emails that I send into my "Sent Items" mailbox. Then my imap program saves it to the server.

Portraitist answered 26/4, 2014 at 10:24 Comment(0)
I
3

I've had the same issue as well.

But after checking the docs I was too blind to see that I had set copy = no set, therefore it wasn't saving any copies of sent emails. Commented that line, fired a message and it was successfully stored in the Sent folder.

In my ~/.muttrc I have the following config so the delivered emails are successfully stored (I'm communicating with a Dovecot email server):

#set copy = no           
set postponed = "=Drafts"
set record = "=Sent"     
Inigo answered 22/2, 2018 at 8:24 Comment(1)
Checking docs, but is there a way to set copy = no from the command-line? While the default to save to sent remains yes, when I run the interactive UI.Bercy

© 2022 - 2024 — McMap. All rights reserved.