Código
<?php $to = $_POST['email']; $from = 'atencionclientes@dominio.com'; $fromName = 'TESTING'; $subject = 'ASUNTO'; $file = "pdfs_tick/".$_POST['token'].".pdf"; $htmlContent = '<h1>Hola '.$_POST['nombre'].'! tu Folio/Referencia es: <strong>'.$_POST['token'].'</strong></h1>'; $headers = "De: $fromName"." <".$from.">"; $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x"; $headers .= "\nMIME-Version: 1.0\n" . "Content-Type: multipart/mixed;\n" . " boundary=\"{$mime_boundary}\""; $message = "--{$mime_boundary}\n" . "Content-Type: text/html; charset=\"UTF-8\"\n" . "Content-Transfer-Encoding: 7bit\n\n" . $htmlContent . "\n\n"; //preparación de archivo $message .= "--{$mime_boundary}\n"; "Content-Transfer-Encoding: base64\n\n" . $data . "\n\n"; } } $message .= "--{$mime_boundary}--"; $returnpath = "-f" . $from; echo $mail?"<h1>Correo enviado.</h1>":"<h1>El envío de correo falló.</h1>";