Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mutt, send email without saving it to Sent folder

Tags:

mutt

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

like image 920
nils Avatar asked Feb 18 '14 17:02

nils


2 Answers

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.

like image 82
gloriphobia Avatar answered Jan 04 '23 00:01

gloriphobia


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"     
like image 43
Daniel Andrei Mincă Avatar answered Jan 03 '23 22:01

Daniel Andrei Mincă