blynkkk / blynk-library

Blynk library for IoT boards. Works with Arduino, ESP32, ESP8266, Raspberry Pi, Particle, ARM Mbed, etc.
https://blynk.io
MIT License
3.83k stars 1.38k forks source link

EMail: end of line in message content #423

Closed dontsovcmc closed 6 years ago

dontsovcmc commented 6 years ago

Blynk library version: 0.5.2

Scenario, steps to reproduce

Send e-mail with multiple lines, but don't see them on "mail.ru" mailbox.

Expected Result

000:00:00:00:888  NOTICE    (BLK) : send email
000:00:00:00:955  NOTICE    (BLK) : email was send
000:00:00:00:955  NOTICE    (BLK) : Новые показания {DEVICE_NAME}
000:00:00:00:955  NOTICE    (BLK) : ГВС: 0.0 м3, ХВС: 0.0 м3
дельта:
гвс: +0.03, хвс: +0.00
питание:3.027 В
CMC:
вода добавить: 0.0 0.0

I see multiple lines in the log

Actual Result

I see in mail.ru letter: ГВС: 0.0 м3, ХВС: 0.0 м3 дельта: гвс: +0.03, хвс: +0.00 питание:3.027 В CMC: вода добавить: 0.0 0.0

Code

I replace \r\n characters cause I show message content on WiFiManager web portal and need to see multiple lines.

                msg.replace("\\n", "\n");
                msg.replace("\\r", "\r");
                msg.replace("{V0}", v0);
                msg.replace("{V1}", v1);
                msg.replace("{V2}", v2);
                msg.replace("{V3}", v3);
                msg.replace("{V4}", v4);

                title.replace("\\n", "\n");
                title.replace("\\r", "\r");
                title.replace("{V0}", v0);
                title.replace("{V1}", v1);
                title.replace("{V2}", v2);
                title.replace("{V3}", v3);
                title.replace("{V4}", v4);

                Blynk.email(sett.email, title, msg);

                LOG_NOTICE("BLK", "email was send");
                LOG_NOTICE("BLK", title);
                LOG_NOTICE("BLK", msg);
vshymanskyy commented 6 years ago

Please use Blynk community forum for such questions

dontsovcmc commented 6 years ago

Sorry ) The answer found: https://community.blynk.cc/t/email-text-new-line/16580/3 =)