Protocols >> SMTP >> How to send mail using smtp via telnet command at command prompt

telnet mail.domain.ext 25<Enter> Connected to mail.domain.ext. Escape character is '^]'. 220 mail.domain.ext ESMTP Sendmail ?version-number?; ?date time gmtoffset? HELO local.domain.name<Enter> 250 mail.domain.ext Hello local.domain.name [loc.al.i.p], pleased to meet you MAIL FROM: mail@domain.ext<Enter> 250 2.1.0 mail@domain.ext... Sender ok RCPT TO: mail@otherdomain.ext<Enter> 250 2.1.0 mail@otherdomain.ext... Recipient ok DATA<Enter> Subject: <subject of email><Enter> From: <sender's email address><Enter> To: <recipient's email addresses><Enter> <Enter> Body of email <last blank line> .<Enter> (single period on a newline followed by Enter) QUIT<enter> Another example =============== telnet: > telnet mx1.example.com smtp 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: <sender@example.com> server: 250 Sender <sender@example.com> Ok client: RCPT to: <recipient@example.com> server: 250 Recipient <recipient@example.com> Ok client: DATA server: 354 Ok Send data ending with <CRLF>.<CRLF> client: From: sender@example.com client: To: recipient@example.com client: Subject: Test message client: client: This is a test message. client: . server: 250 Message received: 20040120203404.CCCC18555.mx1.example.com@client.example.com client: QUIT server: 221 mx1.example.com ESMTP server closing connection