Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- DATAFILE=$1
- RECIPIENT=$2
- echo "Sending email with data..."
- echo "Recipient: " $RECIPIENT
- echo "Attached file: " $DATAFILE
- echo "" | mutt -s "Update" -i /home/pi/msgbody.txt $RECIPIENT -a $DATAFILE
- -rwxr-xr-x 1 pi pi 222 Mar 19 21:51 emailscript
- void sendFile()
- {
- string command = "/home/pi/emailscript " + lastFile + " " + emailAddress;
- system(command.c_str());
- }
- int main()
- {
- cout << "Testing file sending function" << endl;
- sendFile();
- return 0;
- }
- -rwxr-xr-x 1 pi pi 68540 Mar 19 22:49 emailTestCode
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement