Digital Marketing

Send mails by bash script via ssmtp

Install sSMTP, for instance:

apt-get install ssmtp

Configure ssmtp:

sudo nano /etc/ssmtp/ssmtp.conf

· Server:

· Hostname:

· User:

· Pass: AuthPass=your_password

Then in your sh file, do what you need and pipe it to mail, for instance:

mailx -s "Test report" < /dev/null


Popular posts from this blog

Fixed WSL sshd: no hostkeys available -- exiting

PowerMTA pmta command

How to fix: mv: failed to preserve ownership