Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHPmailer's AddEmbeddedImage method not working

Tags:

php

I'm trying to test the PHPmailer class to embed image (http://www.google.gr/intl/en_com/images/srpr/logo1w.png) inside an e-mail

I'm using this code (along with standard one, that 100% works, mail is delivered):

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

and this is placed the e-mail body:

<img src="cid:test">

Image is not showing up. What may I doing wrong?

like image 423
419 Avatar asked Jul 17 '11 12:07

419


1 Answers

Taken from some piece of the documentation:

$path is the path of the filename. It can be a relative one (from your script, not the PHPMailer class) or a full path to the file you want to attach.

Have you tried using a local image?

like image 150
rzetterberg Avatar answered Sep 22 '22 02:09

rzetterberg