How to test SMTP using Swaks

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

 

  1. Open SSH/Terminal window
  2. Get the latest download link of the standalone script from http://www.jetmore.org/john/code/swaks/
  3. Download swaks 
    curl http://www.jetmore.org/john/code/swaks/files/swaks-20201014.0/swaks -o swaks
  4. Change permissions to 755 chmod 755 swaks
  5. 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

  • SMTP, SWAKS
  • 349 Users Found This Useful
Was this answer helpful?

Related Articles

I receive HostRound emails in my SPAM box, how to fix this?

We do our best to improve email deliverability, however, some of our emails may land in your...

What is a Ransomware?

Ransomware is a type of malicious software, or malware, designed to deny access to a computer...

How to clear Google Chrome DNS cache

To clear Google Chrome DNS Cache Type this in the address bar  chrome://net-internals/#dns...

How to connect to FTP server using FileZilla

We're going to explain how to connect to FTP server using FileZilla FTP Client. Before you start...

Chrome is showing weird font/ hand writing font/ script font on some websites

If you visit some websites and see weird font displayed on the website instead of the original...