jaikar Posted February 10, 2009 Share Posted February 10, 2009 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 More sharing options...
PFMaBiSmAd Posted February 10, 2009 Share Posted February 10, 2009 This should work, give it a try - $mail->AddEmbeddedImage('http://your_domain.com/image.php', 'sample', 'sample') Link to comment https://forums.phpfreaks.com/topic/144601-embeding-gd-image-in-email-confused/#findComment-758867 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.