Skip to content

Send E-mail notification

Usage

ResIOT allows you to send notifications through custom e-mails. First of all, you need to create your personal configuration:

Find

  • 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.

Examples:

Smart Scenes:

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:

Find

Find

In this one, instead, when the Gateway goes on timeout, an e-mail is sent to the defined e-mail address/addresses:

Find

Find

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 = "test@example.com" -- 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