Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement