Skip to content

SMTP testing tools

SMTP testing tools are utilities used by developers and system administrators to verify the functionality, connectivity, and configuration of Simple Mail Transfer Protocol (SMTP) servers. These tools range from simple network connectivity checks to sophisticated server mocks for automated testing^[600-developer-smtp.md].

Tools and Utilities

  • Telnet: A basic network protocol available on most operating systems that allows users to manually establish a connection to an SMTP server (typically on port 25) to interactively issue commands and check server status^[600-developer-smtp.md].
  • go-smtp-mock: A Mock SMTP server package available for Go (specifically github.com/mocktools/go-smtp-mock/v2), designed for testing environments where a real mail server is unnecessary or undesirable^[600-developer-smtp.md].
  • SubEtha SMTP: A Java library (voodoodyne/subethasmtp) focused on receiving SMTP mail, useful for building applications that need to process incoming messages^[600-developer-smtp.md].

Key SMTP Commands

When testing SMTP servers, clients typically interact with the server using a defined set of commands^[600-developer-smtp.md]:

  • HELO / EHLO: The initial handshake command used to identify the client to the server. EHLO is used for Extended SMTP (ESMTP) and requests a list of server-supported extensions (like STARTTLS)^[600-developer-smtp.md].
  • STARTTLS: A command used to upgrade the connection to a secure, encrypted channel (TLS) after the initial handshake^[600-developer-smtp.md].
  • MAIL FROM: Specifies the sender's email address in the SMTP envelope^[600-developer-smtp.md].
  • RCPT TO: Specifies the recipient's email address. This command can be issued multiple times to handle multiple recipients^[600-developer-smtp.md].
  • DATA: Indicates that the client is ready to send the message content (headers and body)^[600-developer-smtp.md].
  • QUIT: Terminates the session^[600-developer-smtp.md].

Sources

^[600-developer-smtp.md]