How to install ssmtp on mac?
As you said, the only option is to compile the source code.

You can download from the project repository on github. There is a download button there.

To install it, your have to uncompress the downloaded file. Once done, cd to sSMTP-master directory.

The generic compilation process is executing the following commands one by one:

./configure
make
sudo make install


The configure command can be altered with lots of parameters. To let you know your options, you can run ./configure --help