Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Error sending email [SMTP] #7196

Closed
mario26 opened this issue Apr 1, 2020 · 3 comments
Closed

Error sending email [SMTP] #7196

mario26 opened this issue Apr 1, 2020 · 3 comments

Comments

@mario26
Copy link

mario26 commented Apr 1, 2020

Hello,

I configured the email service in Synapse but the emails are not sent, here is the return:

synapse       | 2020-04-01 10:55:53,106 - synapse.access.http.8008 - 302 - INFO - OPTIONS-9 - 37.173.176.107 - 8008 - {None} Processed request: 0.000sec/0.000sec (0.000sec, 0.000sec) (0.000sec/0.000sec/0) 2B 200 "OPTIONS /_matrix/client/r0/register/email/requestToken HTTP/1.0" "Mozilla/5.0 (X11; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0" [0 dbevts]
synapse       | 2020-04-01 10:55:53,182 - synapse.push.mailer - 315 - INFO - POST-10 - Sending email to xxxxxxx@xxxxxxxx.com
synapse       | 2020-04-01 10:55:53,474 - twisted - 192 - INFO -  - SMTP Client retrying server. Retry: 5
synapse       | 2020-04-01 10:55:53,722 - twisted - 192 - INFO -  - SMTP Client retrying server. Retry: 4
synapse       | 2020-04-01 10:55:53,966 - twisted - 192 - INFO -  - SMTP Client retrying server. Retry: 3
synapse       | 2020-04-01 10:55:54,190 - twisted - 192 - INFO -  - SMTP Client retrying server. Retry: 2
synapse       | 2020-04-01 10:55:54,433 - twisted - 192 - INFO -  - SMTP Client retrying server. Retry: 1
synapse       | 2020-04-01 10:55:54,673 - synapse.handlers.identity - 359 - ERROR - POST-10 - Error sending threepid validation email to xxxxxxx@xxxxxxxx.com
synapse       | Traceback (most recent call last):
synapse       |   File "/usr/local/lib/python3.7/site-packages/synapse/handlers/identity.py", line 356, in send_threepid_validation
synapse       |     yield send_email_func(email_address, token, client_secret, session_id)
synapse       | twisted.mail._except.SMTPConnectError: Unable to connect to server.
synapse       | 2020-04-01 10:55:54,674 - synapse.http.server - 81 - INFO - POST-10 - <XForwardedForRequest at 0x7fb6a34b1ad0 method='POST' uri='/_matrix/client/r0/register/email/requestToken' clientproto='HTTP/1.0' site=8008> SynapseError: 500 - An error was encountered when sending the email
synapse       | 2020-04-01 10:55:54,675 - synapse.access.http.8008 - 302 - INFO - POST-10 - 37.173.176.107 - 8008 - {None} Processed request: 1.501sec/0.001sec (0.016sec, 0.000sec) (0.002sec/0.001sec/2) 81B 500 "POST /_matrix/client/r0/register/email/requestToken HTTP/1.0" "Mozilla/5.0 (X11; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0" [0 dbevts]

I think the server SMTP does not accept the Synapse connection for sending emails, i think of a TLS error...

Here's what my conf looks like:

email:
  # The hostname of the outgoing SMTP server to use. Defaults to 'localhost'.
  #
   smtp_host: mail.xxxxxxxx.com

  # The port on the mail server for outgoing SMTP. Defaults to 25.
  #
  #smtp_port: 587

  # Username/password for authentication to the SMTP server. By default, no
  # authentication is attempted.
  #
   smtp_user: "myuser@xxxxxxxx.com"
   smtp_pass: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

   require_transport_security: true

I have already tried different ways of configuration, nothing works.

Can you help me ?

@clokep
Copy link
Contributor

clokep commented Apr 2, 2020

This sounds like it might be a duplicate of #6211.

@richvdh
Copy link
Member

richvdh commented Apr 8, 2020

assuming this is a duplicate

@richvdh richvdh closed this as completed Apr 8, 2020
@Neustradamus
Copy link

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants