emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Any interest in an XOAUTH2 patch for smtpmail (Gmail 2-factor auth)?


From: Stefan Monnier
Subject: Re: Any interest in an XOAUTH2 patch for smtpmail (Gmail 2-factor auth)?
Date: Sun, 07 Jan 2018 12:42:36 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> A proper generalization of 'smtp-try-auth-method' is easy, of
> course.  All you need is to split the test into functions, eg
> 'smtp-try-plain-auth-method', 'smtp-try-login-auth-method', etc, and
> then have 'smtp-try-auth-method' simply call
> 'smtp-try-<mech>-auth-method.'  Then anybody would be able to define
> their own and just add them to the 'smtpmail-auth-supported' list.

How 'bout just making smtpmail-try-auth-method into a generic function,
so you can do

    (cl-defmethod smtpmail-try-auth-method
        (process (mech (eql xoauth2)) user password)
      ...)


-- Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]