What is the most efficient way to send an email from a wi-fi connected BeagleBone Black using the Cloud9 IDE and Bonescript?
I can use Node on the BBB to run the following code and send an email using ssmtp, but have not been able to get this to work from a script inside the Cloud9 IDE.
function sendMyEmail() {
var flag = true;
if (flag === true) {
var sys = require('sys')
var exec = require('child_process').exec;
function puts(error, stdout, stderr) { sys.puts(stdout) }
exec("ssmtp -t < ~/Desktop/email.txt", puts);
flag = false;
}
}
sendMyEmail();