Following Sending Mail

Since no credentials are given in this configuration, Emacs will look them up in $(HOME)/.authinfo or $(HOME)/.authinfo.gpg (encrypted). The content of this file should follow this scheme:

machine example.org login [your login name] password [your password]

After finished the configuration and send mail

From: [email protected] (abst.proc.do)
To: [email protected]
Subject: Testing
Date: Wed, 22 Jan 2020 07:56:03 +0800
Message-ID: <[email protected]>
--text follows this line--

but got the error:

 gnutls-negotiate: GnuTLS error: #<process smtpmail<1>>, -15

What's the problem? I did not set gnus.

Ubuntu 19.10 emacs 26.3


1 Answer 1


Change your port to use 465 instead of 587

(setq message-send-mail-function 'smtpmail-send-it
      '(("smtp.gmail.com" 465 nil nil))
      smtpmail-default-smtp-server "smtp.gmail.com"
      smtpmail-smtp-server "smtp.gmail.com"
      smtpmail-smtp-service 465
      smtpmail-debug-info t)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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