On 8/29/2013 10:27 AM, Zdzislaw Meglicki wrote: > Ken asks: > >> This is not specific to Cygwin. If it belongs anywhere, it should be in the >> emacs manual. >> I just looked at the section "Emacs speaks SMTP" in the smtpmail >> documentation, and >> the instructions look pretty clear to me. What happens if you follow those >> instructions, >> replacing "mail.example.org" with "smtp.gmail.com"? If there's anything >> Cygwin-specific >> that goes wrong, then I'll try to fix it or add something to >> >> /usr/share/doc/emacs/README.Cygwin, >> >> whatever is appropriate. > > I tried every trick and... it still crashes: the moment you try to send mail > through Google > with emacs. > > My latest .emacs code looked as follows: > > (require 'smtpmail) > (require 'auth-source) > (setq message-send-mail-function 'smtpmail-send-it) > (setq send-mail-function 'smtpmail-send-it) > (setq smtpmail-stream-type 'starttls) > (setq smtpmail-default-smtp-server "smtp.gmail.com") > (setq smtpmail-smtp-server "smtp.gmail.com") > (setq smtpmail-smtp-service 587) > > The crash occurs with or without smtpmail-stream-type set. The authentication > lives on the ~/.authinfo file, which looks as follows: > > machine smtp.gmail.com login <my-login> password <my-password> > > of course, with <my-login> and <my-password> filled with the correct info. > > There is some confusing information on-line and also in the emacs manual > about whether the ~/.authinfo file should be generated by emacs on asking > for the login and password on connection, or whether it should be written by > the user prior to invoking emacs. If I don't have this file, emacs does not > ask > me for the login and password, but it crashes anyway. > > Here's my question to the community: can anyone send e-mail through Google > SMTP from emacs-24.3.1 on the latest 64-bit Windows-8/Cygwin?
I don't use Windows 8, but I just checked on Windows 7, and it works for me. I created a ~/.authinfo file with the following contents: machine smtp.googlemail.com login <my-login> port 587 password <my-passwd> And I put the following in my ~/.emacs: (require 'smtpmail) (setq smtpmail-smtp-server "smtp.googlemail.com") (setq smtpmail-smtp-service 587) (setq send-mail-function 'smtpmail-send-it) [I used "smtp.googlemail.com" because that's the smtp server in my Thunderbird gmail account.] With these settings I can send mail successfully. I do get the following in the *Messages* buffer after sending mail: Sending via mail... gnutls.c: [1] Note that the security level of the Diffie-Hellman key exchange has been lowered to 256 bits and this may allow decryption of the session data Sending email Sending email done gnutls.c: [0] (Emacs) fatal error: The TLS connection was non-properly terminated. Sending...done Ken -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple