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

Commit

Permalink
Fix unhandle exception error in smtp
Browse files Browse the repository at this point in the history
  • Loading branch information
mobizt committed Aug 9, 2019
1 parent 7b2c55d commit 5f47a98
Show file tree
Hide file tree
Showing 8 changed files with 15 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 1.2.1
# Mail Client Arduino Library for ESP32 v 1.2.2

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=1.2.1
version=1.2.2

author=Mobizt

Expand Down
5 changes: 3 additions & 2 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 1.2.1
*Mail Client Arduino Library for ESP32, version 1.2.2
*
* August 7, 2019
* August 9, 2019
*
* 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 @@ -1009,6 +1009,7 @@ bool ESP32_MailClient::sendMail(HTTPClientESP32Ex &http, SMTPData &smtpData)

http.setDebugCallback(NULL);


WiFiClient *client;

if (smtpData._sendCallback)
Expand Down
4 changes: 2 additions & 2 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 1.2.1
*Mail Client Arduino Library for ESP32, version 1.2.2
*
* August 7, 2019
* August 9, 2019
*
* This library allows ESP32 to send Email with/without attachment and receive Email with/without attachment download through SMTP and IMAP servers.
*
Expand Down
2 changes: 1 addition & 1 deletion src/HTTPClientESP32Ex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Customized version of ESP32 HTTPClient Library.
* Allow custom header and payload with STARTTLS support
*
* v 1.1.1
* v 1.1.2
*
* The MIT License (MIT)
* Copyright (c) 2019 K. Suwatchai (Mobizt)
Expand Down
2 changes: 1 addition & 1 deletion src/HTTPClientESP32Ex.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Customized version of ESP32 HTTPClient Library.
* Allow custom header and payload with STARTTLS support
*
* v 1.1.1
* v 1.1.2
*
* The MIT License (MIT)
* Copyright (c) 2019 K. Suwatchai (Mobizt)
Expand Down
9 changes: 5 additions & 4 deletions src/ssl_client32.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
*Customized ssl_client.cpp to support STARTTLS protocol, version 1.0.1
*Customized ssl_client.cpp to support STARTTLS protocol, version 1.0.2
*
* The MIT License (MIT)
* Copyright (c) 2019 K. Suwatchai (Mobizt)
Expand Down Expand Up @@ -498,7 +498,7 @@ int data_to_read(sslclient_context32 *ssl_client)

int send_ssl_data(sslclient_context32 *ssl_client, const uint8_t *data, uint16_t len)
{

log_v("Writing HTTP request..."); //for low level debug
int ret = -1;

Expand All @@ -517,7 +517,7 @@ int send_ssl_data(sslclient_context32 *ssl_client, const uint8_t *data, uint16_t

int get_ssl_receive(sslclient_context32 *ssl_client, uint8_t *data, int length)
{

//log_d( "Reading HTTP response..."); //for low level debug
int ret = -1;

Expand Down Expand Up @@ -785,7 +785,8 @@ int starttlsHandshake(sslclient_context32 *ssl_client, int port)

memset(hMsg, 0, msgLen);
strcpy_P(hMsg, FPSTR("STARTTLS\r\n"));
ssl_client->_debugCallback(FPSTR("INFO: send STARTTLS protocol command"));
if (ssl_client->_debugCallback)
ssl_client->_debugCallback(FPSTR("INFO: send STARTTLS protocol command"));
ret = lwip_write(ssl_client->socket, hMsg, strlen(hMsg));

if (ret < 0)
Expand Down
2 changes: 1 addition & 1 deletion src/ssl_client32.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
*Customized ssl_client.h to support STARTTLS protocol, version 1.0.1
*Customized ssl_client.h to support STARTTLS protocol, version 1.0.2
*
* The MIT License (MIT)
* Copyright (c) 2019 K. Suwatchai (Mobizt)
Expand Down

0 comments on commit 5f47a98

Please sign in to comment.