1

I know that the `smtpmail-auth-credentials' variable has been removed in emacs 24.x, and that we are now expected to use an .authinfo file.

However, I have a specialized need for passing in SMTP credentials via elisp code, without any .authinfo file. I want to use "plain" user-ID/password authentication via port 587 with no SSL nor TLS.

Does anyone know how to accomplish this in 24.x with the credentials encoded in elisp and without the use of an .authinfo file?

Thank you very much in advance.

  • Although this question is of interest to me, it is too broad as written because there are several packages and libraries that use auth-source.el. To the extent that the original poster is able to narrow it down a bit (i.e., to whatever function is being used to send the email and any other helpful details), that would go a long way towards making this question answerable. – lawlist Aug 31 '16 at 13:57
  • 1
    I am currently using the smtpmail package, and smtpmail-send-it. This is being done within the mu4e package. I'm guessing that I either will have to modify/enhance auth-source.el in some way, or else use some other package to send email, instead of smtpmail-send-it. I'm looking for alternatives (any!) which allow me to send mail via mu4e with the SMTP credentials supplied via elisp and not via some external .authinfo-type file. Thank you. – HippoMan Aug 31 '16 at 14:53
  • Would adding your own personal location for a custom .authinfo file be helpful at all? The variable auth-sources is a list of file locations that can be customized. For example, I have one in my user-emacs-directory that I use for dired-mode/tramp connections. – lawlist Aug 31 '16 at 17:46
  • In glancing at the mu4e package, I see that smtpmail-try-auth-methods looks super easy to hack if by chance you could make use that function. To better understand how to use or hack auth-source-search, see my comments underneath the question in the following link which contains an example for how to extract the data from the .authinfo file using auth-source-search: emacs.stackexchange.com/q/26108/2287 – lawlist Aug 31 '16 at 17:57
  • Thank you very much. First of all, I don't want any .authinfo-like file, even in a custom location. But I will look into hacking `auth-source-search'. That looks promising. I was hoping for some sort of existing solution, but I guess this kind of hacking is the only way I can accomplish what I want in emacs 24.x. – HippoMan Aug 31 '16 at 18:18

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.