* Send a blank test message with a subject to an email address:
`mail -s "Subject" user@example.com < /dev/null`
(you can substitute /dev/null with a file, or pipe, to populate the body. It must end with a period on a line by itself.)
* Send a blank email with an attachment:
`mail -a somefile -s "Subject" user@example.com < /dev/null`
* Use `netcat` or `telnet`
```
mjl@tesla> nc localhost 25
220 tesla.local ESMTP Postfix
HELO gmail.com
250 tesla.local
MAIL FROM: mike@tesla.local
250 2.1.0 Ok
RCPT TO: user@example.com
250 2.1.5 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
Subject: test message
hello from tesla
.
250 2.0.0 Ok: queued as 7D91946
QUIT
221 2.0.0 Bye
mjl@tesla>
```
The [SMTP commands](https://www.samlogic.net/articles/smtp-commands-reference.htm) may be lower-case, I spelled them in uppercase here for clarity. There is no SMTP command for *Subject*, use the DATA command and add whatever headers you want, separate from the body with a blank line.