From 4b570c1e2f6a69d3e37fdaed534fdfcf0328989c Mon Sep 17 00:00:00 2001 From: dragondz Date: Sun, 27 Jan 2019 13:56:37 +0100 Subject: [PATCH] Modify Boundaries Seem to work better like that. --- ext_file_attach.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ext_file_attach.php b/ext_file_attach.php index 6158fa8..819a2ec 100644 --- a/ext_file_attach.php +++ b/ext_file_attach.php @@ -146,11 +146,10 @@ function ext_file_attach($evt, $stp, &$payload) $payload['headers']['MIME-Version'] = '1.0'; $payload['headers']['content_type'] = 'multipart/mixed; boundary=' . $fileBoundary; $payload['body'] = '--' . $fileBoundary . $sep - . 'Content-Type: multipart/alternative; boundary=' . $textBoundary . $sep - . '--' . $textBoundary . $sep - . 'Content-Type: text/plain; charset=utf-8' . $sep + . 'Content-Type: multipart/alternative; boundary=' . $fileBoundary . $sep + . '--' . $fileBoundary . $sep + . 'Content-Type: text/plain; charset=iso-8859-1' . $sep . $payload['body'] . $sep - . '--' . $textBoundary . '--' . $sep . '--' . $fileBoundary . $sep . 'Content-Type:' . $file_type . '; ' . 'name="' . $file_name . '"' . $sep