From 96ce74bdd8f7612f6e18334dfd97ed3bde291125 Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Thu, 3 Jun 2021 15:48:44 +0200 Subject: [PATCH] overlooked changes --- lib/lib_div/lib_mail/src/ESP_Mail_Client.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/lib_div/lib_mail/src/ESP_Mail_Client.cpp b/lib/lib_div/lib_mail/src/ESP_Mail_Client.cpp index 3ab5a9495..e2e4608e2 100755 --- a/lib/lib_div/lib_mail/src/ESP_Mail_Client.cpp +++ b/lib/lib_div/lib_mail/src/ESP_Mail_Client.cpp @@ -2753,13 +2753,13 @@ bool ESP_Mail_Client::sendAttachments(SMTPSession *smtp, SMTP_Message *msg, cons if (!_sdOk && att->file.storage_type == esp_mail_file_storage_type_sd) _sdOk = sdTest(); - if (!_flashOk && att->file.storage_type == esp_mail_file_storage_type_flash) + if (!_flashOk && att->file.storage_type == esp_mail_file_storage_type_flash) { #if defined(ESP32) - _flashOk = ESP_MAIL_FLASH_FS.begin(FORMAT_FLASH); + //_flashOk = ESP_MAIL_FLASH_FS.begin(FORMAT_FLASH); #elif defined(ESP8266) - _flashOk = ESP_MAIL_FLASH_FS.begin(); + //_flashOk = ESP_MAIL_FLASH_FS.begin(); #endif - + } if ((!_sdOk && att->file.storage_type == esp_mail_file_storage_type_sd) || (!_flashOk && att->file.storage_type == esp_mail_file_storage_type_flash)) { @@ -2814,8 +2814,10 @@ bool ESP_Mail_Client::openFileRead(SMTPSession *smtp, SMTP_Message *msg, SMTP_At file_existed = ESP_MAIL_SD_FS.exists(filepath.c_str()); } else if (att->file.storage_type == esp_mail_file_storage_type_flash) { -} else if (att->file.storage_type == esp_mail_file_storage_type_univ) { + } + else if (att->file.storage_type == esp_mail_file_storage_type_univ) { file_existed = ESP_MAIL_FLASH_FS.exists(filepath.c_str()); + } } if (!file_existed) {