Send E-mail notification¶
ResIOT allows you to send notifications through custom e-mails. First of all, you need to create your personal configuration:
- Name: the choosen Name for the e-mail configuration;
- Type: select Send Email;
- Email From: the e-mail of the sender;
- Email Name: the Name that the recipient will see;
- Host: your Host of the e-mail service;
- Port: the Port used for sending e-mails by the service;
- Login: Login credential;
- Password: Password credential.
Once you are ready click on Create button. You may now use your configuration with the help of Script Lua 5.1 and Smart Scenes, below some examples.
In this example an e-mail notification is sent to all the user of your Organization when the Node detects a temperature higher than 24°C:
In this one, instead, when the Gateway goes on timeout, an e-mail is sent to the defined e-mail address/addresses:
Script Lua 5.1 Scenes:¶
This code simply send an e-mail with the defined subject and message to the desired e-mail. There Media HexID param isn't required because ResIOT will automatically choose the first e-mail media configuration available.
Email = "firstname.lastname@example.org" -- The e-mail of the receiver Subject = "Subject" Message = "Hello World!" err = resiot_sendemail(Email, Subject, Message) if err ~= "true" then resiot_debug(err) end