Swaks is a very good and easy tool to test SMTP. It's a one-file Perl script that you can download and use with a simple command.
Note: SSH/Terminal Access is required
- Open SSH/Terminal window
- Get the latest download link of the standalone script from http://www.jetmore.org/john/code/swaks/
- Download swaks
curl http://www.jetmore.org/john/code/swaks/files/swaks-20201014.0/swaks -o swaks
- Change permissions to 755
chmod 755 swaks
- Run Swaks using this command to send Email using SMTP AUTH
./swaks --auth \
--server mail.server.com \
--protocol SMTP \
--au AUTH_USERNAME \
--from from@domain.com \
--ap AUTH_PASSWORD \
--to to@address.com \
--h-Subject: "Hello" \
--body 'Test email!'OR
./swaks --auth PLAIN \
--server mail.server.com:587 \
--au AUTH_USERNAME \
--from FROM_ADDRESS \
--ap 'AUTH_PASSWORD' \
--to TO_ADDRESS \
--h-Subject: "SUBJECT" \
--body 'Test email!'
You can learn more about command options from this link https://www.mankier.com/1/swaks#Protocol_Options