From 2f33ec794c6f241c227edf63f3c8ab9c874cd29f Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Sat, 18 Apr 2015 15:51:40 -0400 Subject: [PATCH] Fixes #214 always append outer boundary on sent emails --- inc/email_functions.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/email_functions.inc.php b/inc/email_functions.inc.php index f889a25e..f46255e9 100644 --- a/inc/email_functions.inc.php +++ b/inc/email_functions.inc.php @@ -463,6 +463,7 @@ function hesk_mail($to,$subject,$message,$htmlMessage,$cc=array(),$bcc=array()) { $message .= processDirectAttachments('phpmail', NULL, $outerboundary); } + $message .= "\n\n".'--'.$outerboundary.'--'; // Send using PHP mail() function ob_start(); @@ -515,6 +516,7 @@ function hesk_mail($to,$subject,$message,$htmlMessage,$cc=array(),$bcc=array()) { $message .= processDirectAttachments('smtp', NULL, $outerboundary); } + $message .= "\n\n".'--'.$outerboundary.'--'; if ( ! $smtp->SendMessage($hesk_settings['noreply_mail'], $to_arr, $headersArray, $message)) { @@ -874,7 +876,6 @@ function processDirectAttachments($emailMethod, $postfields = NULL, $boundary = $attcontents = chunk_split(base64_encode($attachmentBinary)); $attachments .= $attcontents."\n\n"; } - $attachments .= "--".$boundary."--"; return $attachments; } }