After update MSMTP not sending via Emacs `mail-send`

What happened?

After upgrading Doom to 3.0.0-pre and reinstalling my homebrew emacs-mac installation to native compilation I have started having a number of issues sending email. I have resolved some of them (seeing that apheleia is preventing Mu4e, and needs to be disabled*), but I have a lingering problem.

I can send emails via message-send-and-exit and message-send (these are both blocked when apheleia is enabled), but when i send messages via mail-send i am prompted for my smtp password even though I have my auth info both in my .msmtprc file and in .authinfo file.

I noted that msmtp was able to send from the command line, but was not able to send via emacs. Going through the process of disabling different packages led me to identifying apheleia as the culprit for that. But testing the different functions to send mail showed me that it’s still not working in all situations.

I’ve looked into it a bit but haven’t found what the issue is.

My issue sounded similar to both of these issues on stack overflow:

Here are the error/info messages I’m seeing:

220 smtp.fastmail.com ESMTP ready
250-smtp.fastmail.com
250-PIPELINING
250-SIZE 71000000
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 AUTH PLAIN LOGIN XOAUTH2 OAUTHBEARER
QUIT
221 2.0.0 Bye

Process smtpmail deleted

doom debug shows the following,

[2023-11-29 08:27:19] auth-source-search: found 1 results (max 1) matching (:max 1 :host "smtp.fastmail.com" :port "465")
[2023-11-29 08:27:22] auth-source-search: found 0 results (max 1) matching (:host "smtp.fastmail.com" :port "465" :user "[[deleted]]@fastmail.com" :max 1 :require (:user :secret) :create t)
[2023-11-29 08:27:22] auth-source-search: found 0 results (max 1) matching (:max 1 :host "smtp.fastmail.com" :user "[[deleted]]@fastmail.com" :port "465")

[...] 

[2023-11-29 08:27:23] 221 2.0.0 Bye

What did you expect to happen?

I should be able to send messages by any of the send commands equally. It appears that send-mail is working differently off different auth information, but I’m not able to identify where from or how it is working differently.

Steps to reproduce

  1. In emacs, Open Mu4e
  2. Create message
  3. Invoke mail-send

System information

macOS 13.6.1 user agent Mu4e 1.10.8 emacs 29.1


Loading data dump...

*I’m considering posting another thread about this behavior for apheleia, as I haven’t seen others post about it, and it’s only been happening since I upgraded. I did have (format +onsave) enabled prior to the upgrade and did not have the problem before. I’ve unpinned temporarily b/c that is making it play nicely with Mu4e, which it wasn’t doing before.

This topic was automatically closed after 360 days. New replies are no longer allowed.