While using emacs e-mails, receiving works fine. Sending does not. If I place my .authfile in the home folder sending mails works fine. It does not ask for smtp server or user or password.

If I move the file to a different folder and use (setq auth-sources "/different_folder/.authinfo") it asks me to provide the smpt server and all credentials. It looks like the variable doesn't work.

Anyone some suggestions on this?


  • 3
    The doc-string says that this should be a list, which can contain multiple elements. How about trying: (setq auth-sources '("/different_folder/.authinfo")) – lawlist Feb 13 '19 at 22:39
  • This improves the behaviour as emacs seems to know the smtp server but still asks me for my user name and password – daeda Feb 14 '19 at 7:21
  • Sounds like a bug that you should report. Use M-x report-emacs-bug. – db48x Feb 16 '19 at 6:20
  • Telling us your version of emacs and showing us the (redacted) contents of your .authinfo would help. Note that 'auth-source' does a fair amount of caching, so it's a good idea to restart Emacs after changing variables that affect it. – rpluim Feb 16 '19 at 11:40
  • Restarting doesn't help. Emacs Version is 25.2 and the redacted content of .authinfo is as follows: machine smtp.gmail.com login myusername port 587 password mypassword. I don't think that the content is problem because it worked at the standard location. – daeda Feb 17 '19 at 16:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.