# Receiving emails from a Spark Core

**URL:** <https://community.particle.io/t/receiving-emails-from-a-spark-core/6418>\
**Category:** Getting Started\
**Created:** [August 16, 2014, 3:36pm UTC](https://community.particle.io/t/receiving-emails-from-a-spark-core/6418 "2014-08-16T15:36:51Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![daz](https://avatars.discourse-cdn.com/v4/letter/d/87869e/32.png) [@daz](https://community.particle.io/u/daz)\
**Post date:** [August 16, 2014, 3:36pm UTC](https://community.particle.io/t/receiving-emails-from-a-spark-core/6418/1 "2014-08-16T15:36:52Z")

</div>

Is it at all possible to receive a predetermined email from the spark core. For instance, say if I had a light sensor hooked up and wanted to be alerted via email if the light went below or above a certain value?

If so could somebody point me in the right direction in terms of libraries that are needed, or an area in which I need to research, etc.

---

<div class="post-metadata">

**Author:** ![MisterNetwork](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/misternetwork/32/2880_2.png) [@MisterNetwork](https://community.particle.io/u/MisterNetwork)\
**Post date:** [August 16, 2014, 6:10pm UTC](https://community.particle.io/t/receiving-emails-from-a-spark-core/6418/2 "2014-08-16T18:10:12Z")

</div>

May I suggest you click the search button and enter “email” 😉

---

<div class="post-metadata">

**Author:** ![daz](https://avatars.discourse-cdn.com/v4/letter/d/87869e/32.png) [@daz](https://community.particle.io/u/daz)\
**Post date:** [August 16, 2014, 6:29pm UTC](https://community.particle.io/t/receiving-emails-from-a-spark-core/6418/3 "2014-08-16T18:29:06Z")

</div>

Thanks, theres a lot of content but I can at least start reading up on how the SMTP protocol functions 😄

---

<div class="post-metadata">

**Author:** ![bko](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bko/32/20704_2.png) [@bko](https://community.particle.io/u/bko)\
**Post date:** [August 16, 2014, 9:55pm UTC](https://community.particle.io/t/receiving-emails-from-a-spark-core/6418/4 "2014-08-16T21:55:09Z")

</div>

So there is SMTP which works great with your local ISPs email but not with gmail etc. since they require HTTPS.

Another option is an intermediary like [pushingbox.com](http://pushingbox.com) that can send mail with just a HTTP GET or POST.

Spark is also working on “web hooks” which is a Spark cloud based intermediary service.

---

<div class="post-metadata">

**Author:** ![daz](https://avatars.discourse-cdn.com/v4/letter/d/87869e/32.png) [@daz](https://community.particle.io/u/daz)\
**Post date:** [August 17, 2014, 11:41am UTC](https://community.particle.io/t/receiving-emails-from-a-spark-core/6418/5 "2014-08-17T11:41:20Z")

</div>

Thanks - I’ve been using Arduino’s for the last 12 months or so, and I am a bit overwhelmed with this board as it is very networked based, which is not my strong point. I am currently searching for videos on basic protocols that I have come across here in order to gain a better understanding.

Will certainly check out [pushingbox.com](http://pushingbox.com)

So, where would the code for HTTP GET or POST go? Its just I’ve used GET to invoke a function from within the spark from the command line. Is there an object that needs instantiating in order to do this?

---

<div class="post-metadata">

**Author:** ![bko](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bko/32/20704_2.png) [@bko](https://community.particle.io/u/bko)\
**Post date:** [August 17, 2014, 1:31pm UTC](https://community.particle.io/t/receiving-emails-from-a-spark-core/6418/6 "2014-08-17T13:31:14Z")

</div>

Hi @daz

You can use this library which is available from the web IDE Build button:

> **[nmattisson/HttpClient](https://github.com/nmattisson/HttpClient)**
>
> HttpClient - Http Client Library for the Spark Core (also well suited for Arduino and other embedded platforms).

Or you can roll your own–it is not too hard.

---

<div class="post-metadata">

**Author:** ![daz](https://avatars.discourse-cdn.com/v4/letter/d/87869e/32.png) [@daz](https://community.particle.io/u/daz)\
**Post date:** [August 17, 2014, 1:55pm UTC](https://community.particle.io/t/receiving-emails-from-a-spark-core/6418/7 "2014-08-17T13:55:50Z")

</div>

Thanks @bko

I’ve also just come across an online course that provides an insight into most web services protocols including all the ones I’ve seen in this forum and the spark documentation, so I will get stuck into them as soon as I can.

Had a quick look at the API for pushingbox and looks similar to what I have been doing in the command line with the “curl” command. Also like the catflap example 🙂

In regards to importing libraries like HttpClient, etc., how do I include them when using the Web IDE? I’m used to the Arduino where you simply drag them to a folder within documents called “library” and then include them within the main document.

Sorry for all the questions!

---

<div class="post-metadata">

**Author:** ![bko](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bko/32/20704_2.png) [@bko](https://community.particle.io/u/bko)\
**Post date:** [August 17, 2014, 2:06pm UTC](https://community.particle.io/t/receiving-emails-from-a-spark-core/6418/8 "2014-08-17T14:06:43Z")

</div>

Here’s the good new doc for using libraries:

[http://docs.spark.io/build/#flash-apps-with-spark-build-using-libraries](http://docs.spark.io/build/#flash-apps-with-spark-build-using-libraries)
