Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var_name='ZZPCI'
- for emailadd in `cat /tmp/email_list.tmp`
- do
- subject_text="Subject with Var Name "$var_name
- subj_text_novar="Subject without Var Name"
- email_mssge="this is the message with variable name "$var_name
- echo "$email_mssge"|mailx -a /tmp/my_report.txt -s "$subject_text" "$emailadd"
- echo "$email_mssge"|mailx -a /tmp/my_report.txt -s "$subj_text_novar" "$emailadd"
- done
- enviaremail() {
- values=$(echo "$@" | tr -d 'n')
- listargs=()
- listargs+=($values)
- heirloom-mailx $( attachment=""
- for (( a = 5; a < ${#listargs[@]}; a++ )); do
- attachment=$(echo "-a ${listargs[a]} ")
- echo "${attachment}"
- done) -v -s "${titulo}"
- -S smtp-use-starttls
- -S ssl-verify=ignore
- -S smtp-auth=login
- -S smtp=smtp://$1
- -S from="${2}"
- -S smtp-auth-user=$3
- -S smtp-auth-password=$4
- -S ssl-verify=ignore
- $5 < ${cuerpo}
- }
Add Comment
Please, Sign In to add comment