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:<[email protected]>
S: 250 Ok
C: RCPT TO:<[email protected]>
S: 250 Ok
C: DATA
S: 354 End data with <CR><LF>.<CR><LF>
C: From: "Admin" <[email protected]>
C: To: Anyone<[email protected]>
C: Cc: [email protected]
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:<[email protected]>
S: 250 Ok
C: RCPT TO:<[email protected]>
S: 250 Ok
C: DATA
S: 354 End data with <CR><LF>.<CR><LF>
C: From: "Admin" <[email protected]>
C: To: Anyone<[email protected]>
C: Cc: [email protected]
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.