I am always forgetting how to test sending an email through an SMTP gateway using the Telnet client. So rather then googling it all the time why not add it here!
The initial telnet: > symbolizes your shell prompt.
The empty line between the headers and the body is important,
as is the line containing only a full stop at the end of the article body.
telnet: > telnet mx1.example.com 25 telnet: Trying 192.0.2.2... telnet: Connected to mx1.example.com. telnet: Escape character is '^]'. server: 220 mx1.example.com ESMTP server ready Tue, 20 Jan 2004 22:33:36 +0200 client: HELO client.example.com server: 250 mx1.example.com client: MAIL from: <firstname.lastname@example.org> server: 250 Sender <email@example.com> Ok client: RCPT to: <firstname.lastname@example.org> server: 250 Recipient <email@example.com> Ok client: DATA server: 354 Ok Send data ending with <CRLF>.<CRLF> client: Subject: Test message client: client: This is a test message. client: . server: 250 Message received: 20040120203404.CCCC18555.firstname.lastname@example.org client: QUIT server: 221 mx1.example.com ESMTP server closing connection