[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: IMAP Sending Issue with Multiple Accounts
From: |
Björn Bidar |
Subject: |
Re: IMAP Sending Issue with Multiple Accounts |
Date: |
Thu, 05 Sep 2024 21:16:11 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Serghei Iakovlev via "Announcements and discussions for GNUS, the GNU
Emacs Usenet newsreader (in English)" <info-gnus-english@gnu.org>
writes:
> Hi Leo,
>
> I think I’ve already tried something similar to what you’re
> suggesting. I even experimented with a specialized hook. Here’s a
> cleaned-up version of my current setup:
>
> --8<-------------------------- separator ------------------------>8--
> (setq gnus-posting-styles
> `((".*"
> (signature ,user-full-name)
> (address "egrep@protonmail.ch")
> ("GCC" "nnimap+main:Sent")
> ("X-Message-SMTP-Method" "smtp 127.0.0.1 1025"))
> ("nnimap\\+gmail:.*"
> (address "redacted@gmail.com")
> ("GCC" "nnimap+gmail:[Gmail]/Sent Mail")
> ("X-Message-SMTP-Method" "smtp smtp.gmail.com 587"))))
>
> (setq message-send-mail-function 'message-smtpmail-send-it)
This setting is redundant. Message-mode will use the right function
based on the variable below.
> (setq send-mail-function #'smtpmail-send-it)
>
> (setq smtpmail-debug-info t)
> (setq smtpmail-stream-type 'ssl)
I would also set smtpmail-servers-requiring-authorization like below so
smtpmail doesn't try to send mail without logging in first.
(setopt smtpmail-servers-requiring-authorization ".*")
If you use Emacs 28 or older use setq instead.
> ;; Disabled in global scope
> ;; (setq smtpmail-default-smtp-server "127.0.0.1")
> ;; (setq smtpmail-smtp-service 1025)
>
> (defun set-mail-transport ()
> (cond ((equal user-mail-address "egrep@protonmail.ch")
> (message "=== sending via proton ===")
> (setq smtpmail-smtp-server "127.0.0.1")
> (setq smtpmail-smtp-service 1025))
> ((equal user-mail-address "redacted@gmail.com")
> (message "=== sending via gmail ===")
> (setq smtpmail-smtp-server "smtp.gmail.com")
> (setq smtpmail-smtp-service 587))))
These are redundant and likely break your posting style.
If you don't like posting styles you can also look into gnus-alias.
You can find my setup for Gnus-alias below:
https://github.com/Thaodan/emacs.d/blob/master/init.org#gnus
> (add-hook 'message-send-hook #'set-mail-transport)
> --8<-------------------------- separator ------------------------>8--
>
> Sending via ProtonMail works perfectly fine, but when I try to send
> through Gmail, it just hangs for a long time, and eventually, I get
> the following:
>
> --8<-------------------------- separator ------------------------>8--
> === sending via gmail ===
> Sending...
> Sending via mail...
> open-network-stream: Failed connect: Operation timed out
> --8<-------------------------- separator ------------------------>8--
>
> I feel like I’m close, but there’s something still not quite
> right. If you have any insights on what might be going wrong or any
> tweaks I should try, I’d really appreciate it.
- IMAP Sending Issue with Multiple Accounts, Serghei Iakovlev, 2024/09/05
- Re: IMAP Sending Issue with Multiple Accounts, Leo Butler, 2024/09/05
- Re: IMAP Sending Issue with Multiple Accounts, Serghei Iakovlev, 2024/09/05
- Re: IMAP Sending Issue with Multiple Accounts,
Björn Bidar <=
- Message not available
- Re: IMAP Sending Issue with Multiple Accounts, Serghei Iakovlev, 2024/09/05
- Re: IMAP Sending Issue with Multiple Accounts, Leo Butler, 2024/09/05
- Re: IMAP Sending Issue with Multiple Accounts, Serghei Iakovlev, 2024/09/05
- Re: IMAP Sending Issue with Multiple Accounts, James Thomas, 2024/09/05
- Re: IMAP Sending Issue with Multiple Accounts, Serghei Iakovlev, 2024/09/05
- Re: IMAP Sending Issue with Multiple Accounts, James Thomas, 2024/09/05
- Re: IMAP Sending Issue with Multiple Accounts, James Thomas, 2024/09/05
- Re: IMAP Sending Issue with Multiple Accounts, Serghei Iakovlev, 2024/09/06
- Re: IMAP Sending Issue with Multiple Accounts, Serghei Iakovlev, 2024/09/06
- Re: IMAP Sending Issue with Multiple Accounts, Robert Pluim, 2024/09/06