I'm trying to test the PHPmailer class to embed image 开发者_StackOverflow社区(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?
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?
cid:test isn't valid url for image.
精彩评论