# 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:

1. Login to WHM as root / Administrator. Then go to the menu:  
    **Home &gt;&gt; Service Configuration &gt;&gt; Exim Configuration Manager**.
    
2. Click on **Advanced Editor**.
    
3. In the **Section: AUTH**, add the following code
    
    ```plaintext
    excrelay_login:
    driver = plaintext
    public_name = LOGIN
    client_send = : USERNAME : PASSWORD
    ```
    
4. In the **Section: ROUTERSTART**, add the following code:
    
    ```plaintext
    send_via_excrelay:
    driver = manualroute
    domains = ! +local_domains
    transport = excrelay_smtp
    route_list = * smtp-relay.gmail.com
    ```
    
5. In the **Section: TRANSPORTSTART**, add the following code:
    
    ```plaintext
    excrelay_smtp:
    driver = smtp
    port = 587
    hosts = smtp-relay.gmail.com
    hosts_require_auth = smtp-relay.gmail.com
    ```
    
6. Click the **Save** button to apply the changes.
