mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-29 13:46:37 +00:00
Refactor Sendmail
Refactor Sendmail
This commit is contained in:
parent
aaf542bf97
commit
ea0fb65845
@ -96,6 +96,7 @@
|
|||||||
#define D_JSON_LOW "Low"
|
#define D_JSON_LOW "Low"
|
||||||
#define D_JSON_MAC "Mac"
|
#define D_JSON_MAC "Mac"
|
||||||
#define D_JSON_MASK "Mask"
|
#define D_JSON_MASK "Mask"
|
||||||
|
#define D_JSON_MEMORY_ERROR "Memory error"
|
||||||
#define D_JSON_MINIMAL "minimal"
|
#define D_JSON_MINIMAL "minimal"
|
||||||
#define D_JSON_MODEL "Model"
|
#define D_JSON_MODEL "Model"
|
||||||
#define D_JSON_MQTT_COUNT "MqttCount"
|
#define D_JSON_MQTT_COUNT "MqttCount"
|
||||||
@ -326,6 +327,7 @@
|
|||||||
#define D_CMND_WEBCOLOR "WebColor"
|
#define D_CMND_WEBCOLOR "WebColor"
|
||||||
#define D_CMND_WEBSENSOR "WebSensor"
|
#define D_CMND_WEBSENSOR "WebSensor"
|
||||||
#define D_CMND_EMULATION "Emulation"
|
#define D_CMND_EMULATION "Emulation"
|
||||||
|
#define D_CMND_SENDMAIL "Sendmail"
|
||||||
|
|
||||||
// Commands xdrv_03_energy.ino
|
// Commands xdrv_03_energy.ino
|
||||||
#define D_CMND_POWERLOW "PowerLow"
|
#define D_CMND_POWERLOW "PowerLow"
|
||||||
|
@ -2608,10 +2608,6 @@ bool JsonWebColor(const char* dataBuf)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define D_CMND_SENDMAIL "sendmail"
|
|
||||||
#define D_JSON_MEMORY_ERROR "memory error"
|
|
||||||
|
|
||||||
|
|
||||||
const char kWebSendStatus[] PROGMEM = D_JSON_DONE "|" D_JSON_WRONG_PARAMETERS "|" D_JSON_CONNECT_FAILED "|" D_JSON_HOST_NOT_FOUND "|" D_JSON_MEMORY_ERROR;
|
const char kWebSendStatus[] PROGMEM = D_JSON_DONE "|" D_JSON_WRONG_PARAMETERS "|" D_JSON_CONNECT_FAILED "|" D_JSON_HOST_NOT_FOUND "|" D_JSON_MEMORY_ERROR;
|
||||||
|
|
||||||
const char kWebCommands[] PROGMEM = "|" // No prefix
|
const char kWebCommands[] PROGMEM = "|" // No prefix
|
||||||
@ -2660,9 +2656,9 @@ void CmndEmulation(void)
|
|||||||
void CmndSendmail(void)
|
void CmndSendmail(void)
|
||||||
{
|
{
|
||||||
if (XdrvMailbox.data_len > 0) {
|
if (XdrvMailbox.data_len > 0) {
|
||||||
uint8_t result = SendMail(XdrvMailbox.data);
|
uint8_t result = SendMail(XdrvMailbox.data);
|
||||||
char stemp1[20];
|
char stemp1[20];
|
||||||
ResponseCmndChar(GetTextIndexed(stemp1, sizeof(stemp1), result, kWebSendStatus));
|
ResponseCmndChar(GetTextIndexed(stemp1, sizeof(stemp1), result, kWebSendStatus));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // USE_SENDMAIL
|
#endif // USE_SENDMAIL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user