xreef / EMailSender

Arduino, esp32, Esp8266 EMailSender with Arduino IDE, simple library to send email via smtp with attachments.
https://www.mischianti.org/category/my-libraries/emailsender-send-email-with-attachments/
MIT License
74 stars 26 forks source link

how to set EMailSender emailSend(email_login, email_password, email_from, smtp_server, smtp_port); #46

Closed yunhai20082008 closed 6 months ago

yunhai20082008 commented 6 months ago
const char* smtp_server = "smtp-mail.outlook.com";
uint16_t smtp_port = 587;
const char* email_login = "sxxxxxx@outlook.com";
const char* email_password = "xxxxxx";
const char* email_from = "sxxxxxx@outlook.com";
const char* RECIPIENT_EMAIL = "sxxxxxxx@163.com";
EMailSender emailSend(email_login, email_password, email_from, smtp_server, smtp_port);   

is this setting right?

[657067][E][ssl_client.cpp:37] _handle_error(): [start_ssl_client():273]: (-29184) SSL - An invalid SSL record was received
[657067][E][WiFiClientSecure.cpp:144] connect(): start_ssl_client: -29184
spmckeon1 commented 6 months ago

Attempting to use the following data to send an email and find that instead of connecting to smtp.domain.com it is connecting to smtp.gmail.com. How do I fix this issue?

DATA BEIUNG SUPPLIED: smtpServer: "smtp.domain.com" smtpServerPortNum: 25 SenderAddr: "esp32@15ab45lp.us" emailAuthorName: "ESP32" SenderPwd: "myPwd" RecipAddr: "7202342754@mms.att.net" emailRecipName: "Stephen"

Using: EMailSender(emp->SenderAddr.c_str(), emp->SenderPwd.c_str(), emp->SenderAddr.c_str(), emp->smtpServer.c_str(), (uint16_t)emp->smtpServerPortNum); and receiving from debug: ONLY ONE RECIPIENTmiltiple destination and attachments Insecure client:0 smtp.gmail.com 465 220 smtp.gmail.com ESMTP c8-20020a170903234800b001dc3c4e7a12sm5406613plh.14 - gsmtp

    HELO mischianti 
    250 smtp.gmail.com at your service

    AUTH LOGIN:
    334 VXNlcm5hbWU6

    Encoding
    esp32@15ab45lp.us
    17
    ZXNwMzJAMTVhYjQ1bHAudXM=
    Encoding
    esp32@15ab45lp.us
    17
    334 UGFzc3dvcmQ6

    Encoding
    myPwd
    10
    TThqb3JAZmxhdw==
    Encoding
    myPwd
    10
    535-5.7.8 Username and Password not accepted. For more information, go to
xreef commented 6 months ago

Hi in the forum a user post his settings for sendgrid. Bye Renzo