1

Emails sent using smtpmail / mu4e appear in Gmail Inbox, both when checked in mu4e and Gmail interface.

I have the following in my .init.el:

(setq
 mu4e-maildir       "~/.mail"   ;; top-level Maildir
 mu4e-drafts-folder "/gmail/[Gmail]/Drafts"
 mu4e-sent-folder   "/gmail/[Gmail]/Sent Mail"
 mu4e-trash-folder  "/gmail/[Gmail]/Trash"
 mu4e-refile-folder "/gmail/[Gmail]/All Mail"
 mu4e-user-mail-address-list '("[email]"))

(setq message-send-mail-function 'smtpmail-send-it
     smtpmail-stream-type 'tls
     smtpmail-default-smtp-server "smtp.gmail.com"
     smtpmail-auth-credentials (expand-file-name "~/.authinfo.gpg")
     smtpmail-smtp-server "smtp.gmail.com"
     smtpmail-smtp-service 465)

(setq mu4e-sent-messages-behavior 'delete)

My .mbsync has the following contents:

IMAPAccount gmail
# Address to connect to
Host imap.gmail.com
User [email]
SSLVersions TLSv1.1
# Pass ***************
# To store the password in an encrypted file use PassCmd instead of Pass
PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/.mailpass.gpg"
#
# Use SSL
SSLType IMAPS
# The following line should work. If get certificate errors, uncomment the two following lines and read the "Troubleshooting" section.
CertificateFile /etc/ssl/certs/ca-certificates.crt
#CertificateFile ~/.cert/imap.gmail.com.pem
#CertificateFile ~/.cert/Equifax_Secure_CA.pem

IMAPStore gmail-remote
Account gmail

MaildirStore gmail-local
Subfolders Verbatim
# The trailing "/" is important
Path ~/.mail/gmail/
Inbox ~/.mail/gmail/Inbox

Channel gmail
Master :gmail-remote:
Slave :gmail-local:
Patterns * ![Gmail]* "[Gmail]/Sent" "[Gmail]/Drafts" "[Gmail]/Trash" "[Gmail]/Starred" "[Gmail]/All Mail"
Create Both
SyncState *
Sync All

My .mail dir has the following structure:

.email tree

closed as off-topic by Tyler, Stefan, Drew, DoMiNeLa10 Mar 12 at 21:50

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not appear to be about emacs, within the scope defined in the help center." – Tyler, Stefan, Drew, DoMiNeLa10
If this question can be reworded to fit the rules in the help center, please edit the question.

  • I voted to close as the problem appears to have been caused by a misconfigured gmail account, and didn't have anything to do with Emacs. – Tyler Mar 12 at 18:30
1

Turns out I had the email address I was using as a test recipient set up as an extra "Send email as" account in Gmail.

Not the answer you're looking for? Browse other questions tagged or ask your own question.