Skip to content

Instantly share code, notes, and snippets.

@fbatschi
fbatschi / bash-smtp-auth-email
Created March 17, 2015 21:18
How to send an email from bash via SMTP Auth
echo "PUT YOUR MAIL BODY HERE" | mailx -s "SUBJECT" -S smtp=smtp://yoursmtpserver.com -S smtp-auth=login -S smtp-auth-user=YOUR_USERNAME -S smtp-auth-password=YOUR_PASSWORD -S from="Sender Name <sender@mail.com>" recipient@mail.com