Device and Door Details in SMTP notification
Posted: Fri Jan 03, 2014 8:43 pm
add as define statements:
#define APP_NOTIFICATION_SUBJECT "MyDoorOpener Notification"
#define ARDUINO_NAME "My Arduino Name" // substitute with a friendly device name
// added door labels for SMS and email reporting
static char door_label[4][25] = { "Left Garage Door", "Center Garage Door", "Right Garage Door", ""}; // substitute with your door labels (make each 25 characters or less)
**** REPLACE LINE BELOW ***
// sprintf(body, "A door or device has been opened for more than %i minute(s).", NOTIFICATIONS_WATCHDOG_MINUTES);
sprintf(body, "%s report: %s has been opened for more than %i minute(s).\n", ARDUINO_NAME, door_label[i], NOTIFICATIONS_WATCHDOG_MINUTES);
**** REPLACE LINES BELOW ****
// char body[] = "A door or device has just been opened.";
char body[100] = "";
sprintf(body, "%s report: %s has been opened\n", ARDUINO_NAME, door_label[i]);
#define APP_NOTIFICATION_SUBJECT "MyDoorOpener Notification"
#define ARDUINO_NAME "My Arduino Name" // substitute with a friendly device name
// added door labels for SMS and email reporting
static char door_label[4][25] = { "Left Garage Door", "Center Garage Door", "Right Garage Door", ""}; // substitute with your door labels (make each 25 characters or less)
**** REPLACE LINE BELOW ***
// sprintf(body, "A door or device has been opened for more than %i minute(s).", NOTIFICATIONS_WATCHDOG_MINUTES);
sprintf(body, "%s report: %s has been opened for more than %i minute(s).\n", ARDUINO_NAME, door_label[i], NOTIFICATIONS_WATCHDOG_MINUTES);
**** REPLACE LINES BELOW ****
// char body[] = "A door or device has just been opened.";
char body[100] = "";
sprintf(body, "%s report: %s has been opened\n", ARDUINO_NAME, door_label[i]);