Hello team, i hope everything is ok.
I’m new here using Blynk Community as well the Blynk Solution.
I’m able to configure my blynk app and the sketch to send email when the hardware come online, an app notification when the software goes offline and online, but i dont know how to do the same but sending an email when the hardware goes offline (Power failure or internet disconnection)
Another thing how can i use a second email for notification? tried 2 accounts gmail and hotmail. Gmail received the email notification but the hotmail account never arrived the message (Neither in the spam folder). What i did was add an extra line for the second email like this:
Blynk.email("XXXXXXX@gmail.com", “Control de Luces en Linea”, “Controlador listo para encender o apagar luces de la casa.”);
Blynk.email("XXXXXXX@hotmail.com", “Control de Luces en Linea”, “Controlador listo para encender o apagar luces de la casa.”);
Here is my code without the extra line for the second email notification:
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <SPI.h>
#include <WiFi101.h>
#include <BlynkSimpleMKR1000.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = “9444c5088772401e80359a386ec5cace”;
// Your WiFi credentials.
// Set password to “” for open networks.
char ssid[] = “(Multicolor) 2016”;
char pass[] = “XXXXXXXX”;
void setup()
{
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
// Or specify server using one of those commands:
//Blynk.begin(auth, ssid, pass, “blynk-cloud.com”, 8442);
//Blynk.begin(auth, ssid, pass, server_ip, port);
while (Blynk.connect() == false) {
// Wait until connected
}
// Send e-mail when your hardware gets connected to Blynk Server
// Just put the recepient’s “e-mail address”, “Subject” and the “message body”
Blynk.email("XXXXXXX@gmail.com", “Control de Luces en Linea”, “Controlador listo para encender o apagar luces de la casa.”);
Blynk.notify(“Control de Luces Encendido”);
}
void loop()
{
Blynk.run();
}