help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with TLS when sending emails


From: Alessandro Bertulli
Subject: Problem with TLS when sending emails
Date: Wed, 11 May 2022 15:28:18 +0200

Hi all.
I was trying to set up my Gmail configuration to send emails from
Emacs. However, I encounter a problem with TLS.

1) I set up a file ~/.authinfo.gpg, where I put

machine imap.gmail.com login alessandro.bertulli96@gmail.com password
-pswd- port 993
machine smtp.gmail.com login alessandro.bertulli96@gmail.com password
-pswd- port 587

Note that "-pswd-" is actually the 16 char long app password generated
by Gmail, required to use external clients.

2) My init file contains

(setq user-full-name "Alessandro Bertulli"
      user-mail-address "alessandro.bertulli96@gmail.com")
(setq smtpmail-smtp-server "smtp.gmail.com"
      smtpmail-smtp-service 587
      smtpmail-stream-type  'ssl
      smtpmail-debug-info t)
;; Configure the function to use for sending mail
(setq message-send-mail-function 'smtpmail-send-it)

I haven't any external package to deal with email (like mu4e, notmuch
etc). With these settings, when I try to compose an email (C-x m), I get
the following error in the *Messages* buffer:

Sending...
Sending via mail...
Decrypting /home/alessandro/.authinfo.gpg...done
gnutls.el: (err=[-15] An unexpected TLS packet was received.) boot:
(:priority NORMAL:%DUMBFW :hostname smtp.gmail.com :loglevel 0
:min-prime-bits nil :trustfiles (/etc/ssl/certs/ca-certificates.crt
/etc/ssl/cert.pem) :crlfiles nil :keylist nil :verify-flags nil
:verify-error nil :callbacks nil)
gnutls-negotiate: GnuTLS error: #<process smtpmail>, -15

What can it be? Is this the right way to send emails? Has any other had
problems with Gmail?
Thank you for your patience,
Alessandro Bertulli


reply via email to

[Prev in Thread] Current Thread [Next in Thread]