Skip to content

Instantly share code, notes, and snippets.

@iitenkida7
Created July 26, 2017 16:11
Show Gist options
  • Save iitenkida7/8e581ba1981d995605700a283d1852e4 to your computer and use it in GitHub Desktop.
Save iitenkida7/8e581ba1981d995605700a283d1852e4 to your computer and use it in GitHub Desktop.
[bash]mailx cmd sample
#!/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}
mail body file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment