Skip to content

Instantly share code, notes, and snippets.

@seunggabi
Created May 17, 2020 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seunggabi/f5a9f05f602b1b532b880bbc4da7c4c0 to your computer and use it in GitHub Desktop.
Save seunggabi/f5a9f05f602b1b532b880bbc4da7c4c0 to your computer and use it in GitHub Desktop.
mail.sh
#!/bin/sh
# yum install mailx
# /etc/mail.rc
# set smtp=host
subject=$1
attach=$2
content=$3
to=$4
echo ${content} | mailx -v -a ${attach} -s ${subject} ${to}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment