I have a form to send form with attachments to email.
It works fine to send files to gmail adresses (on thunderbird client), but to adresses like @company.com on outlook, the attachements came corrupted.
This is what i have in header and body :
//header
$headers = "MIME-Version: 1.0
";
$headers .= "From:".$sender_email."
";
$headers .= "Reply-To: ".$sender_email."" . "
";
$headers .= "Content-Type: multipart/mixed; boundary = $boundary
";
//message text
$body = "--$boundary
";
$body .= "Content-Type: text/plain; charset=ISO-8859-1
";
$body .= "Content-Transfer-Encoding: base64
";
$body .= chunk_split(base64_encode($message));