Hasta ahora tenía que hacer mailings en HTML y enviarlos a ciertas direcciones de email a través de una una funcion aen php (phpmailing).
Ahora me surge la necesidad de enviar esos mismos mailings previamente traducidos al idioma del usuario a quién se le envia. Esa traducción se hace mediante archivos .mo. O sea, enviar una página .php por email... y aquí tengo el problema, que no se envía.
La página enviada (mailXXX.php) no se puede enviar al ser .php. Como puedo hacerlo?
Funcion PHP
Código PHP:
Ver original
try { $mail->Host = "xxxxxx"; // SMTP server $mail->SMTPDebug = 2; // enables SMTP debug information (for testing) $mail->SMTPAuth = xxxxx; // enable SMTP authentication $mail->Host = "xxxxxx"; // sets the SMTP server $mail->Port = xxxxx; // set the SMTP port for the GMAIL server $mail->Username = "xxxxxxx"; // SMTP account username $mail->Password = "xxxxxx"; // SMTP account password //$mail->AddReplyTo('[email protected]', 'First Last'); //$mail->AddReplyTo('[email protected]', 'First Last'); $mail->Subject = "Mailing"; $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically //$mail->AddAttachment('images/phpmailer.gif'); // attachment //$mail->AddAttachment('images/phpmailer_mini.gif'); // attachment $mail->Send(); } catch (phpmailerException $e) { echo $e->errorMessage(); //Pretty error messages from PHPMailer } catch (Exception $e) { echo $e->getMessage(); //Boring error messages from anything else!