Skip to content
This repository has been archived by the owner on Jan 10, 2021. It is now read-only.

Commit

Permalink
Fix the size of SMTP sending attachment data limit issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
mobizt committed Apr 11, 2020
1 parent 488bd8a commit df78d31
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Mail Client Arduino Library for ESP32 v 2.1.2
# Mail Client Arduino Library for ESP32 v 2.1.3

This library allows ESP32 to send Email with/without attachment and receive Email with/without attachment download via SMTP and IMAP servers.

Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name=ESP32 Mail Client

version=2.1.2
version=2.1.3

author=Mobizt

Expand Down
12 changes: 6 additions & 6 deletions src/ESP32_MailClient.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
*Mail Client Arduino Library for ESP32, version 2.1.2
*Mail Client Arduino Library for ESP32, version 2.1.3
*
* April 10, 2020
* April 11, 2020
*
* This library allows ESP32 to send Email with/without attachment and receive Email with/without attachment download through SMTP and IMAP servers.
*
Expand Down Expand Up @@ -4480,11 +4480,11 @@ attachmentData::~attachmentData()
std::vector<std::string>().swap(_filename);
std::vector<uint8_t>().swap(_id);
std::vector<uint8_t>().swap(_type);
std::vector<uint16_t>().swap(_size);
std::vector<size_t>().swap(_size);
std::vector<std::string>().swap(_mime_type);
}

void attachmentData::add(const String &fileName, const String &mimeType, uint8_t *data, uint16_t size)
void attachmentData::add(const String &fileName, const String &mimeType, uint8_t *data, size_t size)
{
_filename.push_back(fileName.c_str());
_mime_type.push_back(mimeType.c_str());
Expand Down Expand Up @@ -4524,7 +4524,7 @@ void attachmentData::free()
std::vector<std::string>().swap(_filename);
std::vector<uint8_t>().swap(_id);
std::vector<uint8_t>().swap(_type);
std::vector<uint16_t>().swap(_size);
std::vector<size_t>().swap(_size);
std::vector<std::string>().swap(_mime_type);
_index = 0;
}
Expand Down Expand Up @@ -4777,7 +4777,7 @@ String SMTPData::getBCC(uint8_t index)
return _bcc[index].c_str();
}

void SMTPData::addAttachData(const String &fileName, const String &mimeType, uint8_t *data, uint16_t size)
void SMTPData::addAttachData(const String &fileName, const String &mimeType, uint8_t *data, size_t size)
{
_attach.add(fileName, mimeType, data, size);
}
Expand Down
10 changes: 5 additions & 5 deletions src/ESP32_MailClient.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
*Mail Client Arduino Library for ESP32, version 2.1.2
*Mail Client Arduino Library for ESP32, version 2.1.3
*
* April 10, 2020
* April 11, 2020
*
* This library allows ESP32 to send Email with/without attachment and receive Email with/without attachment download through SMTP and IMAP servers.
*
Expand Down Expand Up @@ -592,10 +592,10 @@ class attachmentData
std::vector<std::string> _filename = std::vector<std::string>();
std::vector<uint8_t> _id = std::vector<uint8_t>();
std::vector<uint8_t> _type = std::vector<uint8_t>();
std::vector<uint16_t> _size = std::vector<uint16_t>();
std::vector<size_t> _size = std::vector<size_t>();
std::vector<std::string> _mime_type = std::vector<std::string>();

void add(const String &fileName, const String &mimeType, uint8_t *data, uint16_t size);
void add(const String &fileName, const String &mimeType, uint8_t *data, size_t size);
void remove(uint8_t index);
void free();
String getFileName(uint8_t index);
Expand Down Expand Up @@ -1672,7 +1672,7 @@ class SMTPData
@param size - The data length in byte.
*/
void addAttachData(const String &fileName, const String &mimeType, uint8_t *data, uint16_t size);
void addAttachData(const String &fileName, const String &mimeType, uint8_t *data, size_t size);

/*
Expand Down

0 comments on commit df78d31

Please sign in to comment.