Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set timeout and report errors for SMTP mails sent as part of a front end process #19033

Open
bx80 opened this issue Mar 31, 2022 · 0 comments
Open
Labels
Easier debugging For issues that make troubleshooting issues for developers easier. Stability For issues that make Matomo more stable and reliable to run for sys admins.

Comments

@bx80
Copy link
Contributor

bx80 commented Mar 31, 2022

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)

Context

Your Environment

  • Matomo Version:
  • PHP Version:
  • Server Operating System:
  • Additionally installed plugins:
  • Browser:
  • Operating System:
@bx80 bx80 added Stability For issues that make Matomo more stable and reliable to run for sys admins. Easier debugging For issues that make troubleshooting issues for developers easier. labels Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Easier debugging For issues that make troubleshooting issues for developers easier. Stability For issues that make Matomo more stable and reliable to run for sys admins.
Projects
None yet
Development

No branches or pull requests

2 participants