5

I am able to read gmail in gnus, but, after several hours of trying, am still not able to send gmail via gnus.

I have searched extensively here and elsewhere, and have tried many configurations, including ports 465 and 587. I am using a ~/.authinfo file with application-specific passwords, currently with this configuration. I have gnutls-cli installed.

When I try to send gmail, Emacs reports "Sending via mail..." and then appears to hang/wait for a long time. After a while, focus returns to the draft email. The "trace of SMTP session to smtp.gmail.com" is empty.

Update: Current configuration:

~/.authinfo

machine imap.gmail.com login username@gmail.com password ApplicationSpecificPassword port imaps
machine smtp.gmail.com login username@gmail.com password ApplicationSpecificPassword port 465  ; have tried 587

~/.profile

export EMAIL="username@gmail.com"
export NAME="My Name"
export SMTPSERVER="smtp.gmail.com"

~/.gnus

(setq gnus-select-method
  '(nnimap "gmail"
           (nnimap-address "imap.gmail.com")
           (nnimap-server-port "imaps")
           (nnimap-stream ssl)))

(setq
 send-mail-function 'smtpmail-send-it
 message-send-mail-function 'smtpmail-send-it
 user-mail-address "username@gmail.com"
 smtpmail-starttls-credentials '(("smtp.gmail.com" 465 nil nil)) ; tried 587
 smtpmail-auth-credentials (expand-file-name "~/.authinfo")
 smtpmail-default-smtp-server "smtp.gmail.com"
 smtpmail-smtp-server "smtp.gmail.com"
 smtpmail-smtp-service 465 ; tried 587
 smtpmail-debug-info t ; where is this output?
 starttls-extra-arguments nil
 starttls-gnutls-program "/usr/bin/gnutls-cli" ; executable, correct path
 starttls-extra-arguments nil
 starttls-use-gnutls t
 smtpmail-local-domain "my.dotted.ip.address"
)
  • 1
    Just to be sure, did you set smtpmail-debug-info to t? Also, what version of Emacs are you using? Is it compiled against GnuTLS? You can check with M-: (gnutls-available-p), which will show t or nil. – legoscia Jul 8 '15 at 11:55
  • Yes. 24.3.1. Yes (t). – SabreWolfy Jul 8 '15 at 12:02
  • Would you post what your settings you have tried please? – seth Jul 15 '15 at 1:15
  • I have tried many permutations of settings found online, with different ports. I'll add my current configuration to the question. – SabreWolfy Jul 20 '15 at 12:18
  • Here is mine that I use for a shared server account in cyberspace (I have never tried with gmail): machine 12.34.56.789 login myusername password mypassport port ssh See the documentation regarding deprecation of smtpmail-auth-credentials: gnu.org/software/emacs/manual/html_node/smtpmail/… – lawlist Jul 20 '15 at 16:27

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.