sendmail core 2.3 fix

This commit is contained in:
gemu2015 2019-09-05 11:14:33 +02:00
parent ca52a38bc1
commit 1d92436877
2 changed files with 8 additions and 6 deletions

View File

@ -40,7 +40,8 @@ bool SendEmail::send(const String& from, const String& to, const String& subject
DEBUG_EMAIL_PORT.println(port); DEBUG_EMAIL_PORT.println(port);
#endif #endif
#ifndef ARDUINO_ESP8266_RELEASE_2_4_2 #if defined(ARDUINO_ESP8266_RELEASE_2_3_0) || defined(ARDUINO_ESP8266_RELEASE_2_4_2)
#else
client->setInsecure(); client->setInsecure();
bool mfln = client->probeMaxFragmentLength(host.c_str(), port, 512); bool mfln = client->probeMaxFragmentLength(host.c_str(), port, 512);
#ifdef DEBUG_EMAIL_PORT #ifdef DEBUG_EMAIL_PORT
@ -51,6 +52,7 @@ bool SendEmail::send(const String& from, const String& to, const String& subject
} }
#endif #endif
if (!client->connect(host.c_str(), port)) if (!client->connect(host.c_str(), port))
{ {
#ifdef DEBUG_EMAIL_PORT #ifdef DEBUG_EMAIL_PORT

View File

@ -18,14 +18,14 @@ class SendEmail
const int timeout; const int timeout;
const bool ssl; const bool ssl;
const int auth_used; const int auth_used;
#ifndef ARDUINO_ESP8266_RELEASE_2_4_2 #if defined(ARDUINO_ESP8266_RELEASE_2_3_0) || defined(ARDUINO_ESP8266_RELEASE_2_4_2)
WiFiClient* client;
#else
// use bear ssl // use bear ssl
// #include "WiFiClientSecureLightBearSSL.h" // #include "WiFiClientSecureLightBearSSL.h"
// BearSSL::WiFiClientSecure_light *client; // BearSSL::WiFiClientSecure_light *client;
//BearSSL::WiFiClientSecure* client; BearSSL::WiFiClientSecure* client;
WiFiClientSecure* client; //WiFiClientSecure* client;
#else
WiFiClient* client;
#endif #endif
String readClient(); String readClient();
void a3_to_a4(unsigned char * a4, unsigned char * a3); void a3_to_a4(unsigned char * a4, unsigned char * a3);