User doesn't receive the activation email after registration

After registration, the user is logged in automatically and a notification is displayed at the top to verify the email sent but the user doesn’t receive any verification email.
Once the user log out from his account and tries to login back then the verification email is sent to the user.

The issue is why does the user doesn’t receive the verification email at the first place when he is logged into the account automatically. Please help where it went wrong.

@Skovian You need to configure SMTP details.
This documentation might help you.

Good Luck

Thanks amit for your reply. The SMTP details had been configured right from the beginning and was able to receive emails. The problem is verification email is not sent soon after user registers. The verification email is only sent when the user tries to login.

@Skovian Have you looked at the logs around the time of the registration? You might have an error there when the email should be sent, that could put us on the way.