There's an email example in the bone101 examples already on the current Bone images. Try:
bone$ cd /usr/share/bone101/examples/cookbook/06-iot (For newest images)
If that doesn't work try
bone$ cd /var/lib/cloud9/examples/cookbook/06-iot
If that doesn't work you need to update your image.
Then run:
bone$ npm install -g nodemailer
Now edit the file nodemailer-test.js to use your gmail address and password, and edit the to and from email addresses. Then run:
bone$ ./nodemailer-test.js
{ [Error: Invalid login: 534-5.7.9 Application-specific password required. Learn more at
code: 'EAUTH',
responseCode: 534,
command: 'AUTH PLAIN' }
Go to the URL given to set up your application specific password. Edit nodemailer-test.js to include the new password, then run:
bone$ ./nodemailer-test.js.
Your email should be sent.
This is from the
BeagleBone Cookbook. The cookbook has lots of examples like this for doing simple things...
--Mark