From: hgv <hgv@fastmail.com>
To: notmuch@notmuchmail.org
Subject: Help with sending mail from notmuch-emacs
Date: Mon, 09 May 2022 17:54:12 -0400 [thread overview]
Message-ID: <165213325238.16557.2841309328065638457@1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa> (raw)
Dear Notmuch list,
I have used notmuch (very happily) for a number of years with alot as my client. I'm now trying out the emacs client (with doom emacs), which is very cool so far. But I am struggling with two particular points around sending emails and cannot solve them on my own. I am also new to emacs, so please forgive my struggles that stem from being a newbie there.
1. Mail gets sent but doesn't save in the correct directory via FCC. I use msmtpq as my sending program. Upon sending, I receive this message: "message-send-mail-with-sendmail: Sending...failed to mail for [ -oi -f hgv@fastmail.com -t ] : send was successful;" The mail is sent but is not saved in the fcc dir nor entered into the notmuch database. I have enabled emacs debugger (on entry with different functions related to sending) and stepped through the process but didn't see any pertinent information in the messages. My fcc line reads `(setq notmuch-fcc-dirs "fastmail/Sent +sent +inbox +sent-new")` (fuller notmuch-emacs config below). Any guidance on fixing or further troubleshooting (what should I look for on debugger) is appreciated.
2. I have my emacs setup to prefer utf-8 encoding in basically all situations. Emails I send with emacs seem to be correctly encoded. But the Content-Type header is set only to "text/plain" rather than "text/plain; charset=utf-8" (as it is in alot and as it should be). Further, there is no Content-Transfer-Encoding header set. Based on my reading of the emacs message mode docs, Content-Transfer-Encoding should be set on the fly depending on the Content-Type and other factors (to either "quoted-printable" or "base64" for "text/plain"). Perhaps I should not worry about these headers; but it seems like they affect whether mail gets delivered at certain providers and certainly how it displays. Any advice on getting both Content-Type and Content-Transfer-Encoding to set correctly? (Without my settings that prefer utf-8, my emails are ascii encoded and the Content-Type is set as "text/plain; charset=us-ascii" but still no Content-Transfer-Encoding.)
I'm on macos 10.15.7, with notmuch .35 (via homebrew), and GNU emacs 28.1 (from https://github.com/d12frosted/homebrew-emacs-plus via homebrew).
Thank you for your help and for the tremendous software!
hgv
```
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
---snip---
;; mainly force utf-8
(prefer-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(set-file-name-coding-system 'utf-8)
(set-clipboard-coding-system 'utf-8)
(set-buffer-file-coding-system 'utf-8)
---snip---
;; gnus-alias
(autoload 'gnus-alias-determine-identity "gnus-alias" "" t)
(add-hook 'message-setup-hook 'gnus-alias-determine-identity)
(setq gnus-alias-identity-alist
'(("fastmail"
---snip---
))
;; Use "fastmail" identity by default
(setq gnus-alias-default-identity "fastmail")
;; Define rules to match work identity
(setq gnus-alias-identity-rules
---snip---
))
;; sorting out regex and replying
(setq gnus-alias-override-user-mail-address t)
(setq gnus-alias-unknown-identity-rule 'default)
;; auto save
(setq message-auto-save-directory "~/.config/emacs/.local/cache/notmuch/unsaved-drafts")
;; supposedly outdated
;; now sourced from language
(setq message-default-charset "utf-8")
(setq mm-coding-system-priorities '(utf-8))
;; notmuch
(after! notmuch
(setq +notmuch-sync-backend "notmuch new"
+notmuch-delete-tags '("+ztrash")
+notmuch-spam-tags '("+spam")
notmuch-draft-tags '("+draft" "-new")
notmuch-archive-tags '("-inbox" "-unread"))
(setq notmuch-mua-compose-in 'new-window)
(setq notmuch-mua-user-agent-function 'notmuch-mua-user-agent-notmuch)
(setq message-kill-buffer-on-exit t)
(setq message-send-mail-function 'message-send-mail-with-sendmail)
(setq sendmail-program "msmtpq"
mail-specify-envelope-from t
message-sendmail-f-is-evil nil
mail-envelope-from 'header
message-sendmail-envelope-from 'header)
(setq notmuch-address-save-filename "~/.config/emacs/.local/notmuch/address-cache")
(setq notmuch-draft-folder "fastmail/Drafts")
;; overwritten from ~/.config/emacs/.local/straight/repos/notmuch/emacs/notmuch-draft.el
(defun notmuch-draft--mark-deleted ()
(when notmuch-draft-id
(notmuch-tag notmuch-draft-id '("+ztrash"))))
(setq notmuch-fcc-dirs "fastmail/Sent +sent +inbox +sent-new")
(setq notmuch-identities
---snip---
(setq notmuch-mua-send-hook '(notmuch-mua-attachment-check))
(setq notmuch-show-empty-saved-searches nil)
(setq notmuch-multipart/alternative-discouraged '("text/plain" "text/html"))
(setq notmuch-saved-searches
---snip---
)))
```
next reply other threads:[~2022-05-09 22:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-09 21:54 hgv [this message]
2022-05-09 22:13 ` Help with sending mail from notmuch-emacs David Bremner
2022-05-09 22:51 ` hgv
2022-05-12 21:47 ` David Bremner
2022-05-13 22:38 ` hgv
2022-05-16 10:59 ` David Bremner
2022-05-30 20:37 ` HGV
2022-05-31 0:57 ` David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=165213325238.16557.2841309328065638457@1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa \
--to=hgv@fastmail.com \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).