Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/06/2005, 03:36
klyfa
 
Fecha de Ingreso: mayo-2005
Mensajes: 217
Antigüedad: 18 años, 10 meses
Puntos: 5
PHPMAILER - incluir imagenes enbebidas

buenas, necesito ayuda no puedo envio el email pero no puedo incluir las imagenes este es el condigo que pongo:
require("phpmailer/class.phpmailer.php");

$mail = new PHPMailer();

$mail->IsSMTP();
$mail->Host = "smtp.xxx.com";
$mail->SMTPAuth = true;
$mail->Username = "xxx";
$mail->Password = "xxx";
$mail->From = "[email protected]";
$mail->FromName = "Mailer";
$mail->AddAddress("[email protected]", "");

$mail->WordWrap = 50;
$mail-> AddEmbeddedImage('curiara.gif', 'imagen', 'imagen','base64','image/gif');
// add attachments
//$mail->AddAttachment("/tmp/image.jpg", "new.jpg");
$mail->IsHTML(true);
$mail->Subject = "Here is the subject";
$mail->Body = "<b>Sample HTML</b><img src='curiara.gif' name='imagen' width='200' height='89' id='imagen'>";
$mail->AltBody = "This is the body in plain text for non-HTML mail clients";

if(!$mail->Send())
{
echo "Message could not be sent. <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}

echo "Message has been sent";
?>