Welcome email not being sent by SSPR server

  • 7024840
  • 24-Sep-2020
  • 24-Sep-2020

Environment

Self Service Password Reset 4.5

Situation

New user registration enabled
User receives the email token to activate the new user account
User enters token and a success message is displayed
The welcome email is never received by the user

The queue of the server starts growing in size as welcome emails are queued for later processing
If the server is restarted then the old expired emails are deleted and welcome emails that haven't expired start going through
After a period of time, the welcome emails stop processing again and the queue starts to grow.

Resolution


Create two new settings under Settings ⇨ Email ⇨ Email Settings

1)      mail.smtp.connectiontimeout=210000 (210 seconds)
2)      mail.smtp.timeout=180000  (180 seconds)


These are essentially client side timeouts for SMTP connections.

The values are in milliseconds.

Cause

The token email is sent as a single email process which creates a connection to the SMTP server, sends it's data, and then disconnects
The welcome email is part of a low priority batch process. When the server has resources it processes the low priority emails. If the client times out during the processing of the emails then the server will just add the failures to the email queue to be processed later.

Restarting the server causes the queue to be cleaned. During this time the expired emails are deleted and aged out of the queue. The remaining emails are then processed and the server starts sending to the SMTP server.
While sending the emails to the server if the connection times out then the SSPR server cannot send the emails and just places them in the queue for later processing.