Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/03/2011, 08:27
Avatar de oscarenzo
oscarenzo
 
Fecha de Ingreso: julio-2007
Ubicación: Barcelona
Mensajes: 167
Antigüedad: 16 años, 10 meses
Puntos: 2
phpmailer con texto sin formato

Hola chicos, tengo un problemilla, estoy usando phpmailer y deseo enviar e-mails pero en texto sin formato( no html ) estoy usando la función para llamar archivos html para poder adecuar mis plantillas de e-mail, les copio mi código:

Código PHP:
$mail             = new PHPMailer(); // defaults to using php "mail()"
$body             file_get_contents('templates/content.html');
$body             eregi_replace("[\]",'',$body);
$body               str_replace('[ipaddress]',$ipaddress,$body);
$body               str_replace('[port]',$port,$body);
$body               str_replace('[hostname]',$hostname,$body);
$body               str_replace('[password]',$password,$body);
$body               str_replace('[agent]',$agent,$body);

$mail->AddReplyTo("[email protected]","Human");
$mail->SetFrom("[email protected]""Human");

$address "[email protected]";
$mail->AddAddress($address$agent);
$mail->Subject    "Subject message";
$mail->AltBody    "To view the message, please use an HTML compatible email viewer!"// optional, comment out and test
$mail->MsgHTML($body); 
y en mi plantilla tengo lo siguiente:

Código:
Hello, we have any problems with one of our servers, below i show the server details:<br /><br />

<strong>Ip address:</strong> [ipaddress]/n
<strong>Ports affected:</strong> [port]<br />
<strong>Hostname:</strong> [hostname]<br />
<strong>Root password:</strong> [password]<br /><br />

Please check who can be the problem.<br /><br />
Thank you, regards.<br />
[agent]
Podrían ayudarme de como proceder? se los agradecería mucho.

Un saludo y gracias de antemano.