Dumps Posted March 13, 2007 Share Posted March 13, 2007 I've used AddEmbeddedImage as detailed in the PHPmailer documentation to embed an image in an email: ...$mail->IsHTML(true); $mail->AddEmbeddedImage("images/$picciename", "my", "PropertyID_$propid", "base64", "image/jpeg"); $mail->Subject = "Property details for property $propid"; $mail->Body = "Embedded Image: <img src=\"cid:my\" >";... The email is sent successfully but the image is attached rather than embedded in the body of the email which is my objective. Can anyone help? Quote Link to comment https://forums.phpfreaks.com/topic/42590-phpmailer-addembeddedimage-attaches-image-and-but-does-not-embed/ Share on other sites More sharing options...
o3d Posted June 9, 2009 Share Posted June 9, 2009 i know this might seem a bit late but you could try to change the last parameter in the AddEmbeddedImage to "application/octet-stream" (or just leave out the last two parameters). Quote Link to comment https://forums.phpfreaks.com/topic/42590-phpmailer-addembeddedimage-attaches-image-and-but-does-not-embed/#findComment-852585 Share on other sites More sharing options...
Maq Posted June 9, 2009 Share Posted June 9, 2009 i know this might seem a bit late A bit late? I would say very late, like over 2 years late... Quote Link to comment https://forums.phpfreaks.com/topic/42590-phpmailer-addembeddedimage-attaches-image-and-but-does-not-embed/#findComment-852628 Share on other sites More sharing options...
trudog Posted July 1, 2009 Share Posted July 1, 2009 i've used to have the same problem. in my case, the path to the image was the problem. Quote Link to comment https://forums.phpfreaks.com/topic/42590-phpmailer-addembeddedimage-attaches-image-and-but-does-not-embed/#findComment-867137 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.