mirror of https://github.com/arendst/Tasmota.git
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_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
|
||||
* 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;
|
||||
}
|
||||
|
||||
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; }
|
||||
|
||||
client->setTimeout(timeout);
|
||||
|
@ -129,6 +131,10 @@ bool SendEmail::send(const String& from, const String& to, const String& subject
|
|||
return false;
|
||||
}
|
||||
|
||||
String from, to;
|
||||
from = ('<' == *_from.c_str()) ? _from : ("<" + _from + ">");
|
||||
to = ('<' == *_to.c_str()) ? _to : ("<" + _to +">");
|
||||
|
||||
String buffer = readClient();
|
||||
#ifdef DEBUG_EMAIL_PORT
|
||||
MailReadAddLogBuffer(&buffer);
|
||||
|
|
Loading…
Reference in New Issue