Help on sending email

I am a newbie.

I am testing a scene where I want to send alert email if door sensor triggered more than 5 min. I can’t even get the luup code to send email.

So I created a new scene selecting on the doors sensor. I then went to the luup tab and enter some code but nothing works. I am doing this to test sending email functionality.

I tried this code:
local http = require(“socket.http”)
http.request(“http://vera-alert.appspot.com/stat?msg=YourMessage&recipient=YourVeralertCode”)

Not sure what is recipient = yourveralertcode.

I also tried code I found on internet that uses the smtp code and define yahoo pop server but seems to not work.

In each case, I never get an email.

dk, email is Hard. Since you are a self-confessed newbie, start with something simpler.

Have you tried Vera’s built-in notification service rather than sending your own emails?

Have you considered a different notification mechanism such as Prowl (which is widely used and tested in the Vera community)?

Yes. I have tried that but the UI does not do this.

If the devise is trigger over 5 min, then send alert.

Any thoughts?

Also using the search function would help you find many topics on sending emails with vera. There is also a plugin or two that will allow you to send email. Email Notification and I also believe VerAlerts. The “yourveralertcode” is the special code issued when activating the veralert app on your android phone.

  • Garrett

dk, break the problem into:

  • Detecting the door being open for 5 minutes. When it is, have Vera do something (anything). This is a solved problem and you should be able to do it with common plugins. (hint)

  • Sending a notification unconditionally. The Vera UI does this. Prove to yourself that it works.

Once you have mastered both parts then we can join the two.

local http = require("socket.http") http.request("http://vera-alert.appspot.com/stat?msg=YourMessage&recipient=YourVeralertCode")
This will NEVER send an email … if you had the right arguments for “YourVeralertCode” it would send a notification to your Android Vera Alerts client.

BUT wou should not do it this way !!! You should use the Vera Alerts plugin from the App Store.

If the standard MCV notifications are not working … you have not setup your account at cp.mios.com to allow notificatibons.

If you do not want MCV notifications, but you do want Vera Alerts notifications you would still create users at cp.mios.com but manage notification destinations with the Vera Alerts plugin.