Jump to content

Embeding gd image in email - confused :(


jaikar

Recommended Posts

hi there,

 

i have a situation to embed an image created by php GD library in an email, i am using phpmailer. i tried embedding a image file ($mail->AddEmbeddedImage('sample.jpg', 'sample', 'sample');) and called it <img src="cid:sample"> and it worked!, .

 

now, i got to generate an image using GD library and embed in the email.

 

i have a file named  "image.php" that generates the image, when i want to print the image, i will do like this '<img src="image.php">'.

 

now, how do i embed this generated image in the email, since its not a physical image file, i cant point the path of the image. and will this code work? ($mail->AddEmbeddedImage('image.php', 'sample', 'sample');) ?, in this code, i am pointing to the php file, but this can work only in the http, but if this function try to open the file and change to binary, it may not work, i am confused here !! :(

 

ideas would be highly appreciated !!!...

 

thanks in advance !..

 

Link to comment
https://forums.phpfreaks.com/topic/144601-embeding-gd-image-in-email-confused/
Share on other sites

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.