connornishijima / AlertMe

Arduino library for sending email and SMS from nothing but the ESP8266!
GNU General Public License v3.0
68 stars 17 forks source link

Can't get it to work with default settings #10

Open ronthered opened 3 years ago

ronthered commented 3 years ago

I tried it with my own smtp info, no luck. I could not connect to my smtp.

Next, I created a gmail email address, set less security access, rebooted, etc. I used the default gmail settings. Altered the program with my email and sms info. Wemos D1 would mount the SPIFFS file (all data read correctly), connect to my WiFi network, and fail to connect to smtp.

Connecting to WIFI/SMTP...ALERTME: Mounting SPIFFS... ALERTME: Mounted file system. ALERTME: Reading alertme_config.json... ALERTME: Opened config file! ALERTME: Parsed config: {"smtp_server":"smtp.gmail.com","smtp_port":465,"smtp_email":"iXXXXX@gmail.com","smtp_password":"RXXXXXX"}ALERTME:

ALERTME: Connecting to your WiFi network... ALERTME: Testing SMTP connection... ALERTME: Connecting to : ALERTME: smtp.gmail.com Failed to connect to SMTP, config AP active at: 'AlertMe Configuration'

I just go round and round back to the config AP. Cannot connect to smtp. Am I missing something?

email_and_sms.zip

real-bombinho commented 2 years ago

A little late, but maybe someone else struggles:

Line 48 has a fault, producing an erroneous base64 output of the size of the array.

define encode64(arr) encode64_f(arr,sizeof(arr)-1)

is better replaced by

define encode64(arr) encode64_f(arr, strlen(arr))

real-bombinho commented 2 years ago

When doing so it might be advisable to replace strcpy in lines 336 to 338 with strlcpy.