@bx80 opened this Issue on March 31st 2022 Contributor

Matomo sends various emails as part of user interface processes, such as creating a new user or generating new auth tokens.

If there is a mail configuration issue then the email send may hang for longer that the web server request timeout, resulting in the UI action timing out with no error message provided. This can be very difficult to troubleshoot as it may not even be obvious that the user action has triggered a mail send.

PHPMailer has a 300 second default timeout for sending SMTP emails.

This is fine for scheduled tasks, but for email sends which will block a UI response it would be good to consider reducing this to less than 60 seconds and showing an error message.

Perhaps the Mail class could have a property that can be set to indicate that the mail is part of a blocking UI process and could then use a lower timeout and make any resulting error message available to the UI process.

See #19016

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce (for Bugs)

1.
2.

Context

Your Environment

  • Matomo Version:
  • PHP Version:
  • Server Operating System:
  • Additionally installed plugins:
  • Browser:
  • Operating System:
Powered by GitHub Issue Mirror