mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-28 13:16:32 +00:00
add lt and gt signs is missing (#18064)
This commit is contained in:
parent
635afa36de
commit
39fd0cb0c4
@ -22,6 +22,8 @@
|
|||||||
* #define EMAIL_SERVER "smtp.gmail.com"
|
* #define EMAIL_SERVER "smtp.gmail.com"
|
||||||
* #define EMAIL_PORT 465
|
* #define EMAIL_PORT 465
|
||||||
*
|
*
|
||||||
|
* Note : starting with this update, it is not required anymore to include emails in < > as they will
|
||||||
|
* be automatically added if needed
|
||||||
* if email body consist of a single * and scripter is present
|
* if email body consist of a single * and scripter is present
|
||||||
* and a section >m is found, the lines in this section (until #) are sent as email body
|
* and a section >m is found, the lines in this section (until #) are sent as email body
|
||||||
*
|
*
|
||||||
@ -111,7 +113,7 @@ String SendEmail::readClient() {
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SendEmail::send(const String& from, const String& to, const String& subject, const char *msg) {
|
bool SendEmail::send(const String& _from, const String& _to, const String& subject, const char *msg) {
|
||||||
if (!host.length()) { return false; }
|
if (!host.length()) { return false; }
|
||||||
|
|
||||||
client->setTimeout(timeout);
|
client->setTimeout(timeout);
|
||||||
@ -129,6 +131,10 @@ bool SendEmail::send(const String& from, const String& to, const String& subject
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String from, to;
|
||||||
|
from = ('<' == *_from.c_str()) ? _from : ("<" + _from + ">");
|
||||||
|
to = ('<' == *_to.c_str()) ? _to : ("<" + _to +">");
|
||||||
|
|
||||||
String buffer = readClient();
|
String buffer = readClient();
|
||||||
#ifdef DEBUG_EMAIL_PORT
|
#ifdef DEBUG_EMAIL_PORT
|
||||||
MailReadAddLogBuffer(&buffer);
|
MailReadAddLogBuffer(&buffer);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user