PHPmailer AddEmbeddedImage not working

I am trying to check the PHPmailer class for embedding an image (http://www.google.gr/intl/en_com/images/srpr/logo1w.png) in an email

I use this code (along with the standard one, 100% works, mail is delivered):

$mail->AddEmbeddedImage($src, 'test', basename($src));

and this put the email body:

<img src="cid:test">

Image is not displayed. What can i do wrong?

+4
source share
2 answers

Taken from some part of the documentation:

$ path - path to the file name. It can be relative (from your script, not the PHPMailer class) or the full path to the file you want to attach.

Have you tried to use a local image?

+7
source

cid: test invalid url for image.

-4
source

All Articles