Created
July 26, 2017 16:11
-
-
Save iitenkida7/8e581ba1981d995605700a283d1852e4 to your computer and use it in GitHub Desktop.
[bash]mailx cmd sample
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 | |
TITLE="$(date +"%Y年%m月%d日")/出勤" | |
MAILTO=to@example.com | |
FROM=from@example.com | |
#自分にCC | |
MAILCC=${FROM} | |
#スクリプトPath | |
SPATH=$(dirname $0) | |
cat ${SPATH}/mail.tmpl | mail -s ${TITLE} -r ${FROM} -c ${MAILCC} ${MAILTO} | |
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
mail body file | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment