3

I am trying to send email via SMTP in gnus. I can receive email via IMAP just fine, but whenever I try to compose a message send, I get this error:

smtpmail-send-it: Sending failed: 530 5.7.0 Must issue a STARTTLS command first. e5sm37529pdc.94 - gsmtp

This is my smtpmail-send-it configuration:

(setq message-send-mail-function 'smtpmail-send-it
      smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil))
      smtpmail-auth-credentials '(("smtp.gmail.com" 587 "email@example.com" nil))
      smtpmail-default-smtp-server "smtp.gmail.com"
      smtpmail-smtp-server "smtp.gmail.com"
      smtpmail-smtp-service 587
      starttls-use-gnutls t)

I'm not sure what I'm doing wrong here. Any help would be appreciated.

3

I found a solution! I had to tell it where to find gnutls.

(setq message-send-mail-function 'smtpmail-send-it
      smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil))
      smtpmail-auth-credentials '(("smtp.gmail.com" 587 "email@example.com" nil))
      smtpmail-default-smtp-server "smtp.gmail.com"
      smtpmail-smtp-server "smtp.gmail.com"
      smtpmail-smtp-service 587
      starttls-gnutls-program "/usr/local/bin/gnutls-cli"
      starttls-extra-arguments nil
      starttls-use-gnutls t)

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.