Files
MarkdownNotes/howto - send mail from cli.md
chawley 65c434952a Catagorized Notes
Renamed notes to fit categories and be easier to find later: blog, config, howto
2023-04-28 10:31:11 -04:00

989 B

HowTo - Send Mail from the Linux Command Line

Send mail from command line - telnet End the message with a blank line, period and a blank line

You type:

telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 www.fvwdhost2.com ESMTP Postfix

You type:

helo www.fvwdhost2.com
250 www.fvwdhost2.com

You type:

mail from: root@www.fvwdhost2.com
250 2.1.0 Ok

You type:

rcpt to: rzack@pantek.com
250 2.1.5 Ok

You type:

rcpt to: chawley@pantek.com
250 2.1.5 Ok

You type:

data
354 End data with <CR><LF>.<CR><LF>

You type:

Subject:  This is a test


 This is the absolute best way to test mail delivery without worrying about a client or something else being broken.

.
250 2.0.0 Ok: queued as CF91A620B94

You type:

quit
221 2.0.0 Bye
Connection closed by foreign host.