Send mail from Linux CLI
Follow this blog to send and email from Linux CLI
            The following are the steps to take for sending mails via postfix without username password authentication
For SMTP 25 port and STARTTLS 587 port
Use the following method if your postfix server is listening on port 25 and 587
Using telnet command
telnet mail.example.com 587or
telnet mail.example.com 25depending on the port
Using ncat command
ncat mail.example.com 587or
ncat mail.example.com 25depending on the port
For SMTPS 465 port
Using openssl command
openssl s_client -connect mail.example.com:465 -crlf -quietCommon steps after establishing connection
220 services.vigneshn.in ESMTP Postfix
HELO example.com250 mail.example.com
MAIL FROM: vignesh@example.com250 2.1.0 Ok
RCPT TO: toaddress@example.com250 2.1.5 Ok
DATA354 End data with <CR>.<LF>
SUBJECT: This is the subjectThis is the message.250 2.0.0 Ok: queued as 61527CA41EC
QUIT221 2.0.0 Bye
ctrl+C to exitNow you can check if the email has been delivered - Remember to check spam also