On Thu, Sep 05 2024, Serghei Iakovlev via "Announcements and discussions for 
GNUS, the GNU Emacs Usenet newsreader (in English)" <info-gnus-english@gnu.org> 
wrote:

> Björn Bidar <bjorn.bi...@thaodan.de> writes:
>
> I think I've tried about a dozen different combinations before
> finding a working setup.  I also realized I had a typo and was using
> the wrong port (578 instead of the correct 587).  Additionally, I
> found that setting smtpmail-stream-type to either 'ssl or nil also
> caused connection errors.  It seems like I’ve finally got it working
> as expected (yay!).  Here’s the current version of my relevant code
> that made Gnus do what I need:
>
> --8<-----------------cut here----------------start--------------->8--
> (defun my-configure-smtp-stream-type ()
>   "Configure the SMTP stream type based on the current user email address."
>   (cond ((equal user-mail-address "eg...@protonmail.ch")
>          (setq smtpmail-stream-type 'ssl))
>         ((equal user-mail-address "redac...@gmail.com")
>          (setq smtpmail-stream-type 'starttls))))
>
> (add-hook 'message-send-hook #'my-configure-smtp-stream-type)
> --8<-----------------cut here----------------end----------------->8--

That function/hook is unnecessary. You can use
`gnus-secondary-select-methods' or use the Server Buffer to configure
the stream type.

(info "(Gnus) Customizing the IMAP Connection")
(info "(Gnus) Server Buffer")

Leo
  • ... Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
    • ... Leo Butler
      • ... Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
        • ... Xiyue Deng
          • ... Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
        • ... Björn Bidar
        • ... Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
          • ... Leo Butler
            • ... Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
              • ... James Thomas
                • ... Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
                • ... James Thomas
                • ... James Thomas
                • ... Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
                • ... Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
                • ... Robert Pluim
                • ... Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)

Reply via email to