mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 04:36:31 +00:00
fix array attachment
This commit is contained in:
parent
a6ac063a4c
commit
af346835c7
@ -462,6 +462,11 @@ void attach_Array(char *aname) {
|
|||||||
char buff[64];
|
char buff[64];
|
||||||
sprintf_P(buff,PSTR("Content-Disposition: attachment; filename=\"%s.txt\"\r\n\r\n"), aname);
|
sprintf_P(buff,PSTR("Content-Disposition: attachment; filename=\"%s.txt\"\r\n\r\n"), aname);
|
||||||
g_client->write(buff);
|
g_client->write(buff);
|
||||||
|
// send timestamp
|
||||||
|
strcpy(buff, GetDateAndTime(DT_LOCAL).c_str());
|
||||||
|
strcat(buff,"\t");
|
||||||
|
g_client->write(buff);
|
||||||
|
|
||||||
float *fp=array;
|
float *fp=array;
|
||||||
for (uint32_t cnt = 0; cnt<alen; cnt++) {
|
for (uint32_t cnt = 0; cnt<alen; cnt++) {
|
||||||
// export array as tab gelimited text
|
// 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
|
//Start sending Email, can be set callback function to track the status
|
||||||
if (!MailClient.sendMail(smtpData)) {
|
if (!MailClient.sendMail(smtpData)) {
|
||||||
//Serial.println("Error sending Email, " + MailClient.smtpErrorReason());
|
//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 {
|
} else {
|
||||||
status=0;
|
status=0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user