fix array attachment

This commit is contained in:
gemu2015 2020-10-19 07:24:36 +02:00
parent a6ac063a4c
commit af346835c7

View File

@ -462,6 +462,11 @@ void attach_Array(char *aname) {
char buff[64];
sprintf_P(buff,PSTR("Content-Disposition: attachment; filename=\"%s.txt\"\r\n\r\n"), aname);
g_client->write(buff);
// send timestamp
strcpy(buff, GetDateAndTime(DT_LOCAL).c_str());
strcat(buff,"\t");
g_client->write(buff);
float *fp=array;
for (uint32_t cnt = 0; cnt<alen; cnt++) {
// export array as tab gelimited text
@ -725,7 +730,7 @@ uint16_t SendMail(char *buffer) {
//Start sending Email, can be set callback function to track the status
if (!MailClient.sendMail(smtpData)) {
//Serial.println("Error sending Email, " + MailClient.smtpErrorReason());
AddLog_P2(LOG_LEVEL_INFO, PSTR("Error sending Email, %s"), MailClient.smtpErrorReason());
AddLog_P2(LOG_LEVEL_INFO, PSTR("Error sending Email, %s"), MailClient.smtpErrorReason().c_str());
} else {
status=0;