Created
April 3, 2017 20:45
-
-
Save talkingmoose/8b1f8b89e4305fb653ef6c65f55e249b to your computer and use it in GitHub Desktop.
Send a message via authenticated mail SMTP server such as Hotmail or Google.
This file contains hidden or 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/sh | |
| # -v = verbose | |
| # -r = From address | |
| # -c = Cc, 'someone@example.com,somebody@example.com' | |
| # -b = Bcc, 'someone@example.com,somebody@example.com' | |
| # -s = Subject | |
| # -S = variable key=value | |
| echo "This is the message body and contains the message" | mailx -v -r talkingmoose@hotmail.com -c "bill.smith@jamf.com" -s "This is the subject" -S smtp="smtp-mail.outlook.com:587" -S smtp-use-starttls -S smtp-auth=login -S smtp-auth-user="talkingmoose@hotmail.com" -S smtp-auth-password="P@55w0rd" -S nss-config-dir=/etc/pki/nssdb/ -S HOME=/tmp -S ssl-verify=ignore bill@talkingmoose.net | |
| exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment