Step 1: Installation
Install the Symfony Mailer Module via composer.
Step 2:Configuration
enable the Symfony Mailer module, and go configuration page /admin/config/system/mailer
Step 3: SMTP Server Settings
Go to transport tab under mailer policy
Select Transport type SMTP and add transport.
Click on edit on type SMTP and provide SMTP details provided by your email provider.