SHARE
TWEET

Untitled

a guest Mar 19th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash  
  2.     DATAFILE=$1  
  3.     RECIPIENT=$2  
  4.     echo "Sending email with data..."  
  5.     echo "Recipient: " $RECIPIENT  
  6.     echo "Attached file: " $DATAFILE  
  7.     echo "" | mutt -s "Update" -i /home/pi/msgbody.txt $RECIPIENT -a $DATAFILE
  8.      
  9. -rwxr-xr-x  1 pi   pi    222 Mar 19 21:51 emailscript
  10.      
  11. void sendFile()
  12. {
  13.     string command = "/home/pi/emailscript " + lastFile + " " + emailAddress;
  14.     system(command.c_str());
  15. }
  16.  
  17. int main()
  18. {
  19.  
  20.     cout << "Testing file sending function" << endl;
  21.     sendFile();
  22.  
  23.     return 0;
  24.  
  25. }
  26.      
  27. -rwxr-xr-x 1 pi pi 68540 Mar 19 22:49 emailTestCode
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top