In particular I’d love to know a better way to create the API call than assembling a string, tried to make something that could be JSON converted but it looked like I’d need to make a half dozen classes to get that working.
From here I’m going to learn some app XAML and get a crude UI up, then likely convert it to read a sensor on the other end of an xbee, and likely add and LED strip module to visualize moisture levels.
@ Squeebee -
thanks for your great contribution.
I’m just trying to get it working but it seems that I have problems sending to SparkPost. I implemented an account, can send e-mails from this account and got an API key.
I inserted the API Key in your code for the word REDACTED
and chanced the reciepients
is that right?
However it did not work.
Are there other setting that have to be made on SparkPost?
What could be the reason?
This is what I get back:
9/27/2015 10:10:58 AM
Hmm, we seem to have no data.
StatusCode: 401, ReasonPhrase: ‘Unauthorized’, Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
Cache-Control: no-store, no-cache
Date: Sun, 27 Sep 2015 17:11:01 GMT
I was as not right, this line has to be as it was:
@ Squeebee -
I didn’t see that you included a template in your project in the file example.cs.
Now everything works perfect.
Really a very useful application.
How about sending SMS?
Kind regards: RoSchmi
@ RoSchmi - Hi RoSchmi, SMS could be achieved by an API call to a provider such as Nexmo or Twilio. I’ve used Nexmo in the past and I know they offer a free test account, implementing this API should be straightforward:
Sending E-Mail notifications from the raspberry Pi via Sparkpost works fine.
I’m actually trying to port the application to a Spider II Mainboard but yet did not
succeed to access the SparkPost API via https.
Did you (or anybody else) mangage to use SparkPost with a NETMF/Gadgeteer board?
Of course other working solutions to send E-Mails from NETMF-boards are welcome as well.