Ver Mensaje Individual
  #8 (permalink)  
Antiguo 28/12/2008, 11:33
Avatar de NaRanJiTo78
NaRanJiTo78
 
Fecha de Ingreso: noviembre-2007
Ubicación: In the BeaCh
Mensajes: 874
Antigüedad: 16 años, 5 meses
Puntos: 10
Respuesta: Problema al crear pagina php con dreamweaver

Si...esque de PHP es de lo poco que no entiendo mucho,por no decir casi nada...

Esto es el codigo php que tengo(el que viene con el ejemplo del PHPmailer, espero que no sea un canteo poner algo tan largo aqui, si es asi, perdon...

Cita:
<?php

//error_reporting(E_ALL);
error_reporting(E_STRICT);

date_default_timezone_set('America/Toronto');
//date_default_timezone_set(date_default_timezone_ge t());

include_once('class.phpmailer.php');
//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded

$mail = new PHPMailer();

$body = $mail->getFile('contents.html');
$body = eregi_replace("[\]",'',$body);

$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "mail.worxteam.com"; // SMTP server

$mail->From = "[email protected]";
$mail->FromName = "First Last";

$mail->Subject = "PHPMailer Test Subject via smtp";

$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test

$mail->MsgHTML($body);

$mail->AddAddress("[email protected]", "John Doe");

$mail->AddAttachment("images/phpmailer.gif"); // attachment

if(!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
} else {
echo "Message sent!";
}

?>
y lo pongo delante de
Cita:
<!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">
<head>
y me sale el codigo fuente al ejecutar la página...