SMS over email

2 years 10 months ago - 2 years 10 months ago #2211 by Dhoerauf
i was working on a gas sensor for my house and i wanted to sms the results to my cel phone. I dint wat to get a USB cel adaptor.
You can do this over email for free if you have an email acount that uses SMTP.

Read the automation sections to get a grip on how most of this works.

Google your email acount SMTP settings, here is a web page for SMS over email,

here is my code, this is for the gas sensor, im sure you can use it for any sensor:

This code is running one time when program is enabled
public void Setup()

EventHelper.ModuleChangedHandler((o, m, p) =>
EmailHelper.SetupSmtp("********", "**********", "", 587, true);

// Basement Gas smoke Alarm
if (m.Domain == Domains.VIRTUAL && m.Address == "N2S0" && p.Property == "Sensor.DigitalValue" && p.Value == "1")

EmailHelper.SendEmail("*********", "**********", "Basement", "Gas or Smoke Detected");

return true;

This code is running periodicaly when program is enabled.
Cron job detirmine running period.
public void Run()

I hope this helps someone, it helped me.
Send any questions and i will try to help.
The following user(s) said Thank You: osalval

Please Log in or Create an account to join the conversation.

2 years 8 months ago #2486 by anarro

I can not import the certificate gmail , you know how you can do?

pi@rpi ~ $ sudo certmgr -ssl smtp://
Mono Certificate Manager - version
Manage X.509 certificates and CRL from stores.
Copyright 2002, 2003 Motus Technologies. Copyright 2004-2008 Novell. BSD licensed.

X.509 Certificate v3
Issued from: C=US, O=Equifax, OU=Equifax Secure Certificate Authority
Issued to: C=US, O=GeoTrust Inc., CN=GeoTrust Global CA
Valid from: 21/05/2002 4:00:00
Valid until: 21/08/2018 4:00:00
*** WARNING: Certificate signature is INVALID ***
Import this certificate into the CA store ?s

No certificate were added to the stores.


Please Log in or Create an account to join the conversation.

Time to create page: 0.174 seconds