This is a question originally posed on https://answers.launchpad.net/vm/+question/108267 on 2010-04-26.
It asks how one should configure Emacs mail sending packages on MS Windows for use with secure SMTP server such as gmail, which require TLS and STARTTLS. The original question is copied below.
I installed Cygwins gnutls.
In .emacs wrote:
(setq send-mail-function 'smtpmail-send-it message-send-mail-function 'smtpmail-send-it smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil)) smtpmail-auth-credentials (expand-file-name "~/.authinfo") smtpmail-default-smtp-server "smtp.gmail.com" smtpmail-smtp-server "smtp.gmail.com" smtpmail-smtp-service 587 smtpmail-debug-info t) (require 'starttls) (setq starttls-use-gnutls t) (setq smtpmail-debug-info t) (setq smtpmail-debug-verb t) (require 'smtpmail)
I created "~/.authinfo" file with gmail credentials.
I removed starttls.elc, so the compiled version won't be loaded by emacs.
I replaced
(signal-process (process-id process) 'SIGALRM)
to(call-process "g:\\www\\cygwin\\bin\\kill.exe" nil nil nil "-ALRM" (format "%d" (process-id process)))
I used the description from: http://obfuscatedcode.wordpress.com/2007/04/26/configuring-emacs-for-gmails-smtp/
- When I try to send the mail, it says in minibuffer: "Sending failed SMTP error"
In the debug buffer I get an error:
'Process SMTP exited abnormally with code 53'
that doesn't tell me anything useful.