Send mail inside of a function
Hi Renzo,
I get a string from my SQL database which is moved inside of the payload
String payload = https.getString();
SendEmail(payload);
The string goes to the SendEmail function as below
void SendEmail (String testo_mail) {
EMailSender::EMailMessage message;
message.subject = "SMART POT";
message.message = testo_mail;
Serial.println("testo ricevuto: "+ testo_mail);
EMailSender::Response resp = emailSend.send(indirizzo, message);
Serial.println("Sending status: ");
Serial.println(resp.status);
Serial.println(resp.code);
Serial.println(resp.desc);
}
but I got a server error.
Do you have a clue of what it might be wrong?
Many thanks !!!!
Andrea