Ver Mensaje Individual
  #3 (permalink)  
Antiguo 01/09/2015, 12:44
jolquera
 
Fecha de Ingreso: diciembre-2014
Mensajes: 60
Antigüedad: 10 años
Puntos: 1
Respuesta: Warning: mail(): Multiple or malformed newlines found in additional_header

Deje la funcion asi...

function sendHTMLemail($HTML,$from,$to,$subject) {
$eol = PHP_EOL;
$headers = "From: $from".$eol;
$headers .= "Reply-To: $from".$eol;
$headers .= "Return-Path: $from".$eol;
$headers .= "X-Mailer: PHP/" . phpversion();
$headers .= "Content-Type: multipart/alternative;".
"boundary = $boundary".$eol;
$headers .= "This is a MIME encoded message.".$eol;
$headers .= "--$boundary".$eol.
"Content-Type: text/plain; charset=UTF-8".$eol.
"Content-Transfer-Encoding: base64".$eol;
$headers .= chunk_split(base64_encode(strip_tags($HTML)));
$headers .= "--$boundary".$eol.
"Content-Type: text/html; charset=UTF-8".$eol.
"Content-Transfer-Encoding: base64".$eol;
$headers .= chunk_split(base64_encode($HTML));
mail($to,$subject,$headers);
}


Y ya no marca error, se envia el correo, pero me lo muestra asi....

X-Mailer: PHP/5.5.28Content-Type: multipart/alternative;boundary = This is a MIME encoded message.
--
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: base64
ICAgICAgICAgICAgICAgICAgICAgICAgDQogICAgICAgICAgIC AgICAgICAgICAgICANCiAgICAg
ICAgICAgICAgICAgICAgICAgICAgDQogICAgICAgICAgICAgIC AgICAgICAgICAgIEpPUkdFIEFM
QkVSVE8sIA0KCQkJCQkJIHRlIGhhIGVudmlhZG8gdW5hIGludm l0YWNpw7NuIHBhcmEgcXVlIGNv
bnRlc3RlcyBlbCBzaWd1aWVudGUgY3Vlc3Rpb25hcmlvLiANCi AgICAgICAgICAgICAgICAgICAg
ICAgIEVzIG11eSBpbXBvcnRhbnRlIHF1ZSBsbyByZXNwb25kYX MgYSBsYSBicmV2ZWRhZCwgeWEg
cXVlIGVsIGxpbmsgcXVlIHNlIHRlIG1hbmRhIGEgY29udGludW FjacOzbiBzZXLDoSB2w6FsaWRv
IHBvciB1biB0aWVtcG8gZGV0ZXJtaW5hZG8uDQoJCQkJCQkNCg kJCQkJCQ0KICAgICAgICAgICAg
ICAgICAgICAgICAgQ09OVEVTVEFSIENVRVNUSU9OQVJJTw0KIC AgICAgICAgICAgICAgICAgICAg
ICAgDQoJCQkJCQkNCgkJCQkJCU11Y2hhcyBncmFjaWFzIHBvci B0dSBhdGVuY2nDs24uDQogICAg
ICAgICAgICAgICAgICAgICAgICANCiAgICAgICAgICAgICAgIC AgICAgICAgIEF0ZW50YW1lbnRl
Lg0KICAgICAgICAgICAgICAgICAgICAgICAgICANCgkJCQkJCS AgCQ0KCQkJCQkJCSAgICAgICAg
ICAgICAgICAgICAgICAgIA0KICAgICAgICAgICAgICAgICAgIC AgICAgKiBTZXJ2aWNpbyBwcm9w
b3JjaW9uYWRvIHBvciBST0lQQUwgW3JvaXBhbC5jb21dDQogIC AgICAgICAgICAgICAgICAgICAg
ICANCiAgICAgICAgICAgICAgICAgICAgICAgIA==
--
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: base64
ICAgICAgICAgICAgICAgICAgICAgICAgPHRhYmxlIHdpZHRoPS IxMDAlIiBib3JkZXI9IjAiIGNl
bGxwYWRkaW5nPSIwIiBjZWxsc3BhY2luZz0iNSI+PHRyPjx0ZD 4NCiAgICAgICAgICAgICAg
bGxwYWRkaW5nPSIwIiBjZWxsc3BhY2luZz0iNSI+ICAg
ICAgICAgIDxwIGFsaWduPSJsZWZ0Ij48aW1nIHNyYz0iaHR0cD ovL3JvaXBhbC5jb20vaW1hZ2Vz
L2hlYWRlci1sb2dvLnBuZyIgYm9yZGVyPSIwIiBhbHQ9IlJvaX BhbCIgLz48YnI+DQogICAg
L2hlYWRlci1sb2dvLnBuZyIgYm9yZGVyPSIwIiBhbHQ9IlJvaX BhbCIgLz48YnI+ICAg
ICAgICAgICAgICAgICAgICAgIDxmb250IGZhY2U9IkFyaWFsLC BIZWx2ZXRpY2EsIHNhbn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