diff --git a/library.json b/library.json index a6a6f60..6f19539 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "ESP Mail Client", - "version": "3.4.8", + "version": "3.4.9", "keywords": "communication, email, imap, smtp, esp32, esp8266, samd, arduino", "description": "Arduino E-Mail Client Library to send, read and get incoming email notification for ESP32, ESP8266 and SAMD21 devices. The library also supported other Arduino Devices using Clients interfaces e.g. WiFiClient, EthernetClient, and GSMClient.", "repository": { diff --git a/library.properties b/library.properties index bbf5e8f..80b2d2c 100644 --- a/library.properties +++ b/library.properties @@ -1,6 +1,6 @@ name=ESP Mail Client -version=3.4.8 +version=3.4.9 author=Mobizt diff --git a/src/ESP_Mail_Client.cpp b/src/ESP_Mail_Client.cpp index f44573e..4c58543 100644 --- a/src/ESP_Mail_Client.cpp +++ b/src/ESP_Mail_Client.cpp @@ -4,7 +4,7 @@ #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #include "ESP_Mail_Client_Version.h" -#if !VALID_VERSION_CHECK(30408) +#if !VALID_VERSION_CHECK(30409) #error "Mixed versions compilation." #endif @@ -1340,7 +1340,7 @@ bool ESP_Mail_Client::prepareTime(Session_Config *session_config, T sessionPtr) if (session_config->time.ntp_server.length() > 0 || timeShouldBeValid) { - Time.begin(session_config->time.gmt_offset, session_config->time.day_light_offset, session_config->time.ntp_server.c_str()); + Time.begin(session_config->time.gmt_offset, session_config->time.day_light_offset, session_config->time.ntp_server.c_str()); if (!Time.timeReady()) { @@ -1356,7 +1356,7 @@ bool ESP_Mail_Client::prepareTime(Session_Config *session_config, T sessionPtr) if (sessionPtr->client.gprsGetTime(year, month, day, hour, min, sec, timezone)) Time.setTimestamp(Time.getTimestamp(year, month, day, hour, min, sec), timezone); } - else + else if (session_config->time.ntp_server.length()) { #if defined(ENABLE_NTP_TIME) #if !defined(SILENT_MODE) @@ -1381,7 +1381,7 @@ bool ESP_Mail_Client::prepareTime(Session_Config *session_config, T sessionPtr) return true; else if (WiFI_CONNECTED && timeShouldBeValid) { - errorStatusCB(sessionPtr, nullptr, ntpEnabled ? MAIL_CLIENT_ERROR_NTP_TIME_SYNC_TIMED_OUT : MAIL_CLIENT_ERROR_TIME_WAS_NOT_SET, false); + errorStatusCB(sessionPtr, nullptr, ntpEnabled && session_config->time.ntp_server.length() ? MAIL_CLIENT_ERROR_NTP_TIME_SYNC_TIMED_OUT : MAIL_CLIENT_ERROR_TIME_WAS_NOT_SET, false); return false; } diff --git a/src/ESP_Mail_Client.h b/src/ESP_Mail_Client.h index e5604b9..69099a4 100644 --- a/src/ESP_Mail_Client.h +++ b/src/ESP_Mail_Client.h @@ -2,7 +2,7 @@ #define ESP_MAIL_CLIENT_H #include "ESP_Mail_Client_Version.h" -#if !VALID_VERSION_CHECK(30408) +#if !VALID_VERSION_CHECK(30409) #error "Mixed versions compilation." #endif diff --git a/src/ESP_Mail_Client_Version.h b/src/ESP_Mail_Client_Version.h index de8d732..21cd038 100644 --- a/src/ESP_Mail_Client_Version.h +++ b/src/ESP_Mail_Client_Version.h @@ -3,8 +3,8 @@ #ifndef ESP_MAIL_VERSION -#define ESP_MAIL_VERSION "3.4.8" -#define ESP_MAIL_VERSION_NUM 30408 +#define ESP_MAIL_VERSION "3.4.9" +#define ESP_MAIL_VERSION_NUM 30409 /* The inconsistent file version checking to prevent mixed versions compilation. */ #define VALID_VERSION_CHECK(ver) (ver == ESP_MAIL_VERSION_NUM) diff --git a/src/ESP_Mail_Const.h b/src/ESP_Mail_Const.h index 761c8a4..195ab0b 100644 --- a/src/ESP_Mail_Const.h +++ b/src/ESP_Mail_Const.h @@ -6,7 +6,7 @@ #define ESP_MAIL_CONST_H #include "ESP_Mail_Client_Version.h" -#if !VALID_VERSION_CHECK(30408) +#if !VALID_VERSION_CHECK(30409) #error "Mixed versions compilation." #endif diff --git a/src/ESP_Mail_Error.h b/src/ESP_Mail_Error.h index 152795c..172e7f8 100644 --- a/src/ESP_Mail_Error.h +++ b/src/ESP_Mail_Error.h @@ -7,7 +7,7 @@ #define ESP_MAIL_ERROR_H #include "ESP_Mail_Client_Version.h" -#if !VALID_VERSION_CHECK(30408) +#if !VALID_VERSION_CHECK(30409) #error "Mixed versions compilation." #endif diff --git a/src/ESP_Mail_FS.h b/src/ESP_Mail_FS.h index faccac7..b9c9755 100644 --- a/src/ESP_Mail_FS.h +++ b/src/ESP_Mail_FS.h @@ -6,7 +6,7 @@ #define ESP_MAIL_CONFIG_H #include "ESP_Mail_Client_Version.h" -#if !VALID_VERSION_CHECK(30408) +#if !VALID_VERSION_CHECK(30409) #error "Mixed versions compilation." #endif diff --git a/src/ESP_Mail_IMAP.h b/src/ESP_Mail_IMAP.h index 69f501b..ddfdbed 100644 --- a/src/ESP_Mail_IMAP.h +++ b/src/ESP_Mail_IMAP.h @@ -3,7 +3,7 @@ #define ESP_MAIL_IMAP_H #include "ESP_Mail_Client_Version.h" -#if !VALID_VERSION_CHECK(30408) +#if !VALID_VERSION_CHECK(30409) #error "Mixed versions compilation." #endif diff --git a/src/ESP_Mail_SMTP.h b/src/ESP_Mail_SMTP.h index e8052dc..8371e95 100644 --- a/src/ESP_Mail_SMTP.h +++ b/src/ESP_Mail_SMTP.h @@ -3,7 +3,7 @@ #define ESP_MAIL_SMTP_H #include "ESP_Mail_Client_Version.h" -#if !VALID_VERSION_CHECK(30408) +#if !VALID_VERSION_CHECK(30409) #error "Mixed versions compilation." #endif diff --git a/src/ESP_Mail_TCPClient.h b/src/ESP_Mail_TCPClient.h index f20cb60..9302f6d 100644 --- a/src/ESP_Mail_TCPClient.h +++ b/src/ESP_Mail_TCPClient.h @@ -30,7 +30,7 @@ #define ESP_MAIL_TCPCLIENT_H #include "ESP_Mail_Client_Version.h" -#if !VALID_VERSION_CHECK(30408) +#if !VALID_VERSION_CHECK(30409) #error "Mixed versions compilation." #endif diff --git a/src/extras/MB_Time.h b/src/extras/MB_Time.h index 63fa94b..73d84ac 100644 --- a/src/extras/MB_Time.h +++ b/src/extras/MB_Time.h @@ -2,7 +2,7 @@ #define MB_Time_H #include "ESP_Mail_Client_Version.h" -#if !VALID_VERSION_CHECK(30408) +#if !VALID_VERSION_CHECK(30409) #error "Mixed versions compilation." #endif diff --git a/src/extras/Networks_Provider.h b/src/extras/Networks_Provider.h index 335d941..fd523be 100644 --- a/src/extras/Networks_Provider.h +++ b/src/extras/Networks_Provider.h @@ -4,7 +4,7 @@ #include "../ESP_Mail_FS.h" #include "../ESP_Mail_Client_Version.h" -#if !VALID_VERSION_CHECK(30408) +#if !VALID_VERSION_CHECK(30409) #error "Mixed versions compilation." #endif diff --git a/src/extras/RFC2047.cpp b/src/extras/RFC2047.cpp index 4d3a920..95e5ac1 100644 --- a/src/extras/RFC2047.cpp +++ b/src/extras/RFC2047.cpp @@ -2,7 +2,7 @@ #define RFC2047_CPP #include "ESP_Mail_Client_Version.h" -#if !VALID_VERSION_CHECK(30408) +#if !VALID_VERSION_CHECK(30409) #error "Mixed versions compilation." #endif diff --git a/src/extras/RFC2047.h b/src/extras/RFC2047.h index bb2a6ba..baadaa6 100644 --- a/src/extras/RFC2047.h +++ b/src/extras/RFC2047.h @@ -4,7 +4,7 @@ #define RFC2047_H #include "ESP_Mail_Client_Version.h" -#if !VALID_VERSION_CHECK(30408) +#if !VALID_VERSION_CHECK(30409) #error "Mixed versions compilation." #endif