How to add External SMTP on WHM/cPanel with GSuite Relay SMTP

Have you ever experienced emails from your server not reaching their destination — just disappearing? They've been sent without any errors, but the recipient never gets them. In this case, the issue is most likely in the email delivery process — it could be that the VPS where WHM is installed doesn't have port 25 open.
One of the most effective solutions to fix this is: Smarthost SMTP Relay. Here's how to set it up in WHM/cPanel:
Login to WHM as root / Administrator. Then go to the menu:
Home >> Service Configuration >> Exim Configuration Manager.Click on Advanced Editor.
In the Section: AUTH, add the following code
excrelay_login: driver = plaintext public_name = LOGIN client_send = : USERNAME : PASSWORDIn the Section: ROUTERSTART, add the following code:
send_via_excrelay: driver = manualroute domains = ! +local_domains transport = excrelay_smtp route_list = * smtp-relay.gmail.comIn the Section: TRANSPORTSTART, add the following code:
excrelay_smtp: driver = smtp port = 587 hosts = smtp-relay.gmail.com hosts_require_auth = smtp-relay.gmail.comClick the Save button to apply the changes.

