You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SMTP server can be slow, like several seconds slow, which holds up the response from Drupal when submitting a form or performing an action that has to send an email, such as a user with elevated roles logging in. We'll need to be able to send mail asynchronously after the response is sent to the browser.
Symptoms
Logging in as a user with elevated roles takes a good few seconds, likely because the SMTP server connection is holding up the request until emails have been sent.
admin/config is also really slow to load, very likely because the status checks are run every time if a user has access to view them, and the SMTP module's connection check is run again as described above.
Requirements
Sending mail needs to not delay sending the response to the browser.
Sending mail needs to happen as quickly as possible, so that time sensitive emails arrive in a reasonable amount of time, ideally not noticeably delayed compared to sending synchronously; for example, a password reset email is expected to arrive within 30 seconds or less from submitting the form, so we can't rely on waiting for cron to run to do this. See The quest for a more intelligent queue system that supports prioritizing, parallel processing, etc. #3
Solutions
It looks like the Queue Mail module might be just what we need to satisfy requirement 1, but it doesn't seem to concern itself how the queue is processed, which means that requirement 2 is something we'll need to solve ourselves or find a module/library to handle that.
The SMTP server can be slow, like several seconds slow, which holds up the response from Drupal when submitting a form or performing an action that has to send an email, such as a user with elevated roles logging in. We'll need to be able to send mail asynchronously after the response is sent to the browser.
Symptoms
admin/reports/status
is slow to load every time, likely because the SMTP module always runs a connection test via itshook_requirements()
every time.admin/config
is also really slow to load, very likely because the status checks are run every time if a user has access to view them, and the SMTP module's connection check is run again as described above.Requirements
Solutions
It looks like the Queue Mail module might be just what we need to satisfy requirement 1, but it doesn't seem to concern itself how the queue is processed, which means that requirement 2 is something we'll need to solve ourselves or find a module/library to handle that.
Symfony Mailer
Additionally, the Drupal Symfony Mailer module (see #1) doesn't support queuing (though Symfony Mailer itself does),
and the Queue Mail module doesn't support the Drupal Symfony Mailer module because ugh, so we may have to contribute that if no one else does by the time we get to this.Edit: See Symfony Messenger details in #3The text was updated successfully, but these errors were encountered: