RSS Feed for This PostCurrent Article

Send Email Using Telnet

It is very straightforward to send email using telnet if you know some simple SMTP command


> telnet smtp.server.com 25

S: 220 smtp.server.com ESMTP Postfix
C: HELO relay.twit88.com
S: 250 Hello relay.twit88.com, I am glad to meet you
C: MAIL FROM:<admin@twit88.com>
S: 250 Ok
C: RCPT TO:<admin@twit88.com>
S: 250 Ok
C: DATA
S: 354 End data with <CR><LF>.<CR><LF>
C: From: "Admin" <admin@twit88.com>
C: To: Anyone<anyone@yahoo.com>
C: Cc: another@yahoo.com
C: Date: Tue, 27 Jan 2008 16:02:43 -0500
C: Subject: Test message
C:
C: Hello Anyone
C: This is a test message
C: .
S: 250 Ok: queued as 11111
C: MAIL FROM:<admin@twit88.com>
S: 250 Ok
C: RCPT TO:<theboss@example.com>
S: 250 Ok
C: DATA
S: 354 End data with <CR><LF>.<CR><LF>
C: From: "Admin" <admin@twit88.com>
C: To: Anyone<anyone@yahoo.com>
C: Cc: another@yahoo.com
C: Date: Tue, 27 Jan 2008 16:02:43 -0500
C: Subject: Test message
C:
C: Hello Anyone
C: This is a test message
C: .
S: 250 Ok: queued as 11112
C: QUIT
S: 221 Bye

RFC 0821 describes the SMTP protocol in details.


Trackback URL


Sorry, comments for this entry are closed at this time.