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

SMTP DATA error (503 5.5.1 RCPT first) #42

Closed amutto closed 1 year ago

amutto commented 1 year ago

Hi people, Does anyone know about this error? I was investigating and nothing, I did not find anything relevant to solve it. I'm not sending many emails at the same time or anything weird. Any help or something to investigate? Thank you all !!! Below, you will find a part of the code where I involve email sending. (gmail) Thank you ale

P.S. I also commented the lines corresponding to SPIFFS to separate topics and the error remains the same.

include


   EMailSender emailSend("*************@gmail.com", "*****************", "**********@gmail.com", "Nombre", "smtp.gmail.com", 465);
    RECIPIENT_EMAIL = "**quienrecibe****@gmail.com";

    EMailSender::EMailMessage message;
    message.subject = "Curva de horno.";
    message.message = "Adjunto la curva solicitada.";

    envioFile = "quema_2022.11.05_18.37.csv"; 
    Serial.println(envioFile);
    EMailSender::FileDescriptior fileDescriptor[1];
    fileDescriptor[0].filename = (envioFile);
    fileDescriptor[0].url = ("/" + envioFile);
    fileDescriptor[0].storageType = EMailSender::EMAIL_STORAGE_TYPE_SPIFFS;
    fileDescriptor[0].mime = MIME_TEXT_PLAIN;
    fileDescriptor[0].encode64 = true;

    EMailSender::Attachments attachs = {1, fileDescriptor};
    Serial.println(RECIPIENT_EMAIL);
    EMailSender::Response resp = emailSend.send(RECIPIENT_EMAIL, message, attachs);

    Serial.println("Sending status: ");
    Serial.println(resp.status);
    Serial.println(resp.code);
    Serial.println(resp.desc);

xreef commented 1 year ago

Hi, do you have to follow the tutorial to configure Gmail on the site? Bye Renzo