0
votes

What I need to do is sending emails through my preferred SMTP server but saving those messages to my GMAIL account sent folder on the IMAP server. I am really struggling to do so.

I can send no problem, but I can't save on the imap [Gmail]Sent Mail. Thunderbird can do this flawlessly, so it is only a matter of configuration.

I tried so many things such as:

set record = imaps://imap.gmail.com/INBOX/INVIATA
set record = "+[Gmail]/Sent Mail"
set record = "+[Gmail]/Posta inviata"

It just does not work.

Here is my .muttrc file:

# About Me

set from = "[email protected]"
set realname = "John Doe"
set imap_user = "[email protected]"

# My mailboxes
set imap_pass = $GMAIL_PASS
set folder = imaps://imap.gmail.com/
set spoolfile = imaps://imap.gmail.com/INBOX


# SMTP user auth
# # fill in the right user and pass based on your setup
# # protocols: smtp for TLS (25/587), smtps for SSL (465)

set smtp_url = "smtps://[email protected]@mail.smtpAccount.it:465/"
set smtp_pass = $SMTP_PASS

# Where to save copies of outgoing mail

#here what I have tried so far:
#set record = imaps://imap.gmail.com/SENT
#set record = "imaps://imap.gmail.com/[Gmail]/inviata"
#set record = imaps://imap.gmail.com/INBOX/INVIATA
#set record = "+[Gmail]/Sent Mail"
#set record = "+[Gmail]/Posta inviata"

set record = +[Gmail]/Sent Mail


# Where to put the stuff
set header_cache = "~/.mutt/cache/headers"
set message_cachedir = "~/.mutt/cache/bodies"
set certificate_file = "~/.mutt/certificates"
1

1 Answers

0
votes

It looks like you want to use the Googles SMTP server. If that is the case, set the record to an empty string as it handles saving the sent mail automatically.

set smtp_url = 'smtps://[email protected]'
set smtp_pass = 'yourpassword'
set record=""