echo "This is the main body of the mail" | mail -s "Subject of the Email" -a "From: test@iot-parts.com" manish.kolikata@gmail.com
telnet iot-parts.com 25 mailMAIL FROM:root@iot-parts.com RCPT TO:manish.kolikata@gmail.com DATA
telnet localhost 143 a login "username" "password" Test using imaps port (assuming you haven't disabled imaps port): # openssl s_client -connect imap.example.com:993 Test using imap port and STARTTLS command (works also with imap port): # openssl s_client -connect imap.example.com:143 -starttls imap b select inbox c list "" * e logout