开发者

PHPmailer's AddEmbeddedImage method not working

开发者 https://www.devze.com 2023-03-21 01:09 出处:网络
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 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消