Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- MAILTO="to@example.jp"
- MAILFROM="from@example.jp"
- SMTP_PASS="hogehoge"
- SMTP_USER="from@example.jp"
- SMTP_DOMAIN="smtp.gmail.com"
- BODY="This is test message"
- SUBJECT="This is subject"
- echo $BODY | mailx -v \
- -r "$MAILTO" \
- -s "$SUBJECT" \
- -S smtp="$SMTP_DOMAIN" \
- -S smtp-use-starttls \
- -S smtp-auth=login \
- -S smtp-auth-user="$SMTP_USER" \
- -S smtp-auth-password="$SMTP_PASS" \
- -S ssl-verify=ignore \
- -S nss-config-dir=/etc/pki/nssdb \
- $MAILTO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement