Commits

christiansalazar committed 9b2fa01

fix: crugemailer formato mejorado.

Comments (0)

Files changed (2)

extensions/crugemailer/CrugeMailerBase.php

 	protected function sendEmail($to,$subject,$body) {
 		$from = $this->mailfrom;
 		$_subject = $this->subjectprefix.$subject;
-		$headers="From: {$from}\r\nReply-To: {$from}";
+		$headers  = "From: {$from}\r\nReply-To: {$from}"."\r\n";
+		$headers .= "MIME-Version: 1.0"."\r\n";
+		$headers .= "Content-type: text/html; charset=utf-8"."\r\n";
 		$ret = @mail($to,$_subject,$body,$headers);
 		$tmp = "to:".$to."\nsubject:".$_subject."\nbody:".$body."\n";
 		Yii::log("email:\n".$tmp."\n","info");

views/layouts/mailer.php

-<h1>Mailer<h1>
-contenido correo: <?php echo $content;?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+	<meta name="language" content="en" />
+</head>
+<body>
+	<?php echo $content;?>
+</body>