Author Topic: how to call sendmail function  (Read 446 times)

Offline adizero

  • Member
  • **
  • Posts: 259
how to call sendmail function
« on: May 18, 2016, 10:51:56 AM »
mga bro

meron kami existing shell script.   pero missing ""    pano kaya macapture ang lahat ng output value below like uptime and date   sa ?  will run thru crontab and automatic nya tatawagin si

Problem :  Pano ma capture lahat ng data from check_status and magamit ang mutt email command  sa function from different script which is   meron at least 3 functions sa loob ng

                      mutt -s "SUBJECT" < testmail.txt[/font]

Example :

File name :


cat | send_email -s $SUBJECT <<EOF1 &

Computer Time
`date -u`

System Uptime

Offline barurutor

  • Moderators
  • Member
  • *
  • Posts: 3498
  • The Truth Shall Make Ye Fret.
Re: how to call sendmail function
« Reply #1 on: May 18, 2016, 11:51:51 AM »
generate the email message first then call send_mail with the completed message, no inline shell commands or anything.
<insert witty saying or hobby specs here>