Created
August 9, 2022 12:39
-
-
Save tacone/5e35546429d20fdabc69d52a8d40370f to your computer and use it in GitHub Desktop.
Send a mail from the CLI using an external SMTP server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo -e '\n\nSample test body' | LC_ALL=C mail -Sv15-compat -Sttycharset=utf8 \ | |
-S 'mta=smtp://smtpuser:smtppassword@smtphost:587' -S 'smtp-auth=plain' \ | |
-a 'attachment.bin' \ | |
-r '[email protected]' \ | |
-s 'sample subject' \ | |
-t '[email protected]' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment