Testing Google SMTP relay service with Telnet

Telnet provides an easy solution to test your Google Workspace SMTP relay configuration. You can simulate the SMTP conversation step by step, from the initial connection to sending email commands. However, keep in mind that Telnet is a plaintext protocol, and it’s not secure for sending sensitive information like email credentials. For production use and secure email transmission, it’s recommended to use established email clients or libraries that support secure protocols like SMTPS (SMTP over SSL/TLS) or STARTTLS (SMTP with TLS encryption). Telnet is primarily used for testing and debugging purposes.


Install Telnet on Windows

  1. Use the Windows search to search for “Turn Windows features on or off”.
  2. In the “Windows Features” window that appears, search for “Telnet Client.”
  3. Check the box next to “Telnet Client” to enable it.
  4. After clicking “OK” Windows will install the Telnet Client feature.
Enable Telnet Windows
Enable the Microsoft Telnet Client on Windows.

Configure the Google Workspace SMTP relay

  1. Open the Admin Console and navigate to:
    Apps > Google Workspace > Gmail > Routing > SMTP relay service
  2. Create a new configuration by clicking on “Add another rule
  3. Define the “Allowed senders” and set your static IP as authentication method.
    Further information can be found in the respective Google Help Center article.
  4. Finalize the setup by clicking on “Save“. Changes can take up to 24 h before being fully propagated.
Google Workspace SMTP Configuration
SMTP relay service configuration.

Sending a test email

  1. Open the Microsoft Telnet Client:
    Press “Windows key + R” on your keyboard simultaneously, type “telnet” and press “Enter” or click on the “OK” button.

  1. Initiates a connection to the SMTP server via port 25:
    open smtp-relay.gmail.com 25

  1. Greet the SMTP server and identify the client’s domain:
    HELO from-domain.com

  1. Specify the sender’s email address:
    MAIL FROM: <sender@from-domain.com>

  1. Specify the recipient’s email address
    RCPT TO: <recipient@to-domain.com>

  1. Indicate the start of the email data:

  1. Specify the recipient’s email address within the email header:

  1. Set the email subject:
    subject:SMTP Relay Test

  1. Define the actual email content or body of the message:
    SMTP Relay Test Message

  1. Signify the end of the email message data:

  1. Terminate the SMTP session and close the connection to the SMTP server:
Telnet Commands
Telnet commands to send a test message via SMTP relay.
asterix Written by:

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *