Sending an email with a stmp server requiring authentification fails
when password-store is configured in auth-sources.

The credentials for the smtps server I use are defined in .authinfo.gpg,
not in password-store, although the same username is present in some
entries but without being associated with an smtp server.

If auth-sources only contains .authinfo.gpg, I can send an email without
any problem.

If auth-sources is set to (password-store "~/.authinfo.gpg"
"~/.authinfo" "~/.netrc"), sending an email fails with

smtpmail-send-it: Sending failed: 535 5.7.8 Error: authentication failed: 
authentication failure in response to dm9ya29mZXNzZWJpcXVldHRl

In both cases, the following snippet returns the same correct values for
the credentials for the smtp server

--8<---------------cut here---------------start------------->8---
(let ((auth-info (car (auth-source-search :host "smtp.free.fr"
                                          ))))
  (when auth-info
    (let ((user (plist-get auth-info :user))
          (secret (plist-get auth-info :secret)))
      (message "Utilisateur : %s" user)
      (if (functionp secret)
          (message "Mot de passe : %s" (funcall secret)) ;; Déchiffre le mot de 
passe si nécessaire
        (message "Mot de passe : %s" secret)))))
--8<---------------cut here---------------end--------------->8---


-- 
Julien Cubizolles


-- 
Julien Cubizolles

Reply via email to