Jump to content

how to remove inline image from the attachment header?


leidieu

Recommended Posts

Hi all, i was wondering if any one can help me out with this problem.I'm trying to find a way to remove my inline image from the attachment option. Every time i send an inline image its comes in the attachment....any ideas how i can prevent it from coming in the attachment header?

 

Here is the code:-

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

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

$mail->Subject  = "Inline image test";

$mail->Body    = "Hello, <b>my friends here is the image</b>! \n\n <img alt=\"\" src=\"cid:email_prize\" width=\"181\" height=\"157\" >";

 

 

$mail->AddEmbeddedImage("images/email_prize.GIF", "email_prize", "images/email_prize.GIF");

$mail->IsHTML(true);

 

if(!$mail->Send()) {

echo 'Message was not sent.';

echo 'Mailer error: ' . $mail->ErrorInfo;

} else {

echo 'Message has been sent.';

}

It should always be an attachment. You could either:

  1) Display the image via an external link 'yourdomain.com/image.gif'

  2) Attach the image, and display it within the e-mail, not leaving it just as an attachment.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.