save sent message copy only after actually sending it
Currently, messages are saved in the sent-folder when they are handed to $sendmail
, regardless of the result. When $sendmail
fails, mutt jumps back to the compose menu, but a copy of the message is already stored in the sent-folder. When re-sending the message, it is saved again - resulting in duplicate messages.
I assume this is done in line 1823 of send.c:
/* save a copy of the message, if necessary. */
mutt_expand_path (fcc, sizeof (fcc));
Possibly, that should be re-ordered in the file.
(Taken from trac ticket)