Tema: phpmailer
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/08/2010, 14:32
servidigital
 
Fecha de Ingreso: abril-2010
Mensajes: 182
Antigüedad: 14 años, 1 mes
Puntos: 8
phpmailer

hola amigo he estado buscando en el foro y no he encontrado alguna respuesta respecto al phpmailer
me gustaría saber como le hago para enviar un mail php donde tenga algunos datos extraídos de la base de datos

Código PHP:

include_once('../FUNCIONES/PHPMailer/class.phpmailer.php');


$mail    = new PHPMailer();

$body    $mail->getFile('registro-minianuncio.php');


$body    eregi_replace("[\]",'',$body);

$mail->From     "xxxxxxxxxxxxxx";
$mail->FromName "xxxxxxxxxxx";
$mail->Subject "Felicitaciones xxxxx";
$mail->AltBody "Para ver el mensaje, por favor, utilice un visor de HTML de correo electrónico compatibles!"// optional, comment out and test
$mail->MsgHTML($body);

$mail->AddAddress($_POST['email'], $_POST['nombre']);

if(!
$mail->Send()) {
  echo 
'Fallo  envio mail';
} else {
  echo 
'';


espero me puedan colaborar muchas gracias