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$ c*d /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
534 5.7.9  https://support.google.com/accounts/answer/185833 
v7sm4244267ita.9 - gsmtp]
  code: 'EAUTH',
  response: '534-5.7.9 Application-specific password required. Learn more 
at\n534 5.7.9  *https://support.google.com/accounts/answer/185833* 
v7sm4244267ita.9 - gsmtp',
  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 
<http://shop.oreilly.com/product/0636920033899.do>.  The cookbook has lots 
of examples like this for doing simple things...

--Mark

<https://lh3.googleusercontent.com/-9YDO3IuMNq0/V7hx4-KFnOI/AAAAAAAAWrw/CenVqn40HOMLBQvsquGDvAYvtuLM1AZzwCLcB/s1600/cat.gif>



On Friday, August 19, 2016 at 4:09:54 PM UTC-4, Wally Bkg wrote:
>
> IMHO the simplest way to do it is setup a free Gmail account and enable 
> imap/pop support on it.  Then install mutt on your BBB and configure it to 
> send the email through Gmail.  Then on the BBB do something like
>
> system("echo 'No Heartbeat:' `/bin/date` | /usr/bin/mutt -s ' Problem!' -- 
> user@domain. ; rm $HOME/sent");
>
> Google Mutt and Raspberry Pi, there are lots of good tutorials, the mutt 
> setup is the same for the BBB as it is for the Pi.  I'm using it on both my 
> BBW and Rpi2.
>
>
> On Friday, August 19, 2016 at 10:01:44 AM UTC-5, volk...@gmail.com wrote:
>>
>> Hello all,
>>
>> I am trying to do a (presumably) very simple task. 
>> I want my Beaglebone Black (BBB) to send me an email when a button wired 
>> to it is pushed. 
>>
>> A) I don't know for sure if I have Angstrom or Debian (or otherwise?) and 
>> I don't know how to find out
>> B) I'm aware of email services include msmtp, ssmtp, exim4, etc from my 
>> current efforts on the topic, but I don't know how to download, install, 
>> and set them up (or even which one I should use)
>>
>> Background info: I'm currently using Putty as my terminal to talk to the 
>> BBB. I've found that I need to connect an ethernet cable directly to the 
>> BBB (instead of piggybacking via USB tot he laptop's wireless) to actually 
>> get network capability. 
>>
>> I've been working on this for the past few days, but this is my first 
>> time getting my hands dirty with a BBB (and Linux, operating systems in 
>> general), so most of the tutorials I've been reading aren't very helpful 
>> because they assume I know things that I don't (they say "install this 
>> package"....but how?). If we could piece together a sort of step-by-step 
>> for this whole process, that would vastly help both myself and anyone else 
>> trying to do what I'm doing. Thanks much!
>>
>> The main tutorial I'm following: 
>> http://inspire.logicsupply.com/2014/04/alarm1-send-email.html
>>
>> Some other links I've been using:
>>
>> http://dumb-looks-free.blogspot.com/2014/06/beaglebone-black-bbb-send-mail-via-gmail.html
>>
>> http://tombuntu.com/index.php/2008/10/21/sending-email-from-your-system-with-ssmtp/
>> http://nekhbet.com/ssmtp_gmail.shtml
>> http://linux.die.net/man/5/ssmtp.conf
>>
>> http://www.absolutelytech.com/2010/07/17/howto-configure-msmtp-to-work-with-gmail-on-linux/
>>
>> http://knek-tek.me/index.php/2015/05/28/how-to-send-email-from-the-beaglebone-black-with-a-gmail-account/
>> https://wiki.openwrt.org/doc/howto/smtp.client
>>
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/6dd5dda3-a25d-46c5-a018-ae5990396d18%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to