Fixes #214 always append outer boundary on sent emails

This commit is contained in:
Mike Koch 2015-04-18 15:51:40 -04:00
parent 6c92977f4a
commit 2f33ec794c

View File

@ -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;
}
}