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: