diff --git a/lisp/nnimap.el b/lisp/nnimap.el index afdea18..1cf275d 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -55,6 +55,9 @@ (nnoo-declare nnimap) +(defvoo nnimap-user nil + "Username to use for authentication to the IMAP server. Overrides the username obtained from auth-source-search.") + (defvoo nnimap-address nil "The address of the IMAP server.") @@ -412,7 +415,8 @@ textual parts.") (setq nnimap-object nil) (let ((nnimap-inhibit-logging t)) (setq login-result - (nnimap-login (car credentials) (cadr credentials)))) + (nnimap-login (or nnimap-user (car credentials)) + (cadr credentials)))) (if (car login-result) (progn ;; Save the credentials if a save function exists