فهرست منبع

Add newline separator to fix wrong attachment sent

Issue:

Missing newline between header and attachment

Issue seen with email clients viz., AppleMail and YahooMail. Attachment is not renderable.
Some clients like Google mail, Samsung mail tolerate the issue.

Fix:
Added newline between header and attachment.

Closes https://github.com/espressif/esp-idf/issues/6098

Signed-off-by: Vikram Dattu <vikram.dattu@espressif.com>
Vikram Dattu 5 سال پیش
والد
کامیت
5fc644ac27
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      examples/protocols/smtp_client/main/smtp_client_example_main.c

+ 1 - 1
examples/protocols/smtp_client/main/smtp_client_example_main.c

@@ -451,7 +451,7 @@ static void smtp_client_task(void *pvParameters)
     len = snprintf((char *) buf, BUF_SIZE,
                    "Content-Type: image/image/png;name=esp_logo.png\n"
                    "Content-Transfer-Encoding: base64\n"
-                   "Content-Disposition:attachment;filename=\"esp_logo.png\"\n");
+                   "Content-Disposition:attachment;filename=\"esp_logo.png\"\r\n\n");
     ret = write_ssl_data(&ssl, (unsigned char *) buf, len);
 
     /* Image contents... */