Guest Posted June 30, 2008 Share Posted June 30, 2008 I have a gif image created on the fly that I want to send as an attachment is there a way that I can do that without storing a temporary file? Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted June 30, 2008 Share Posted June 30, 2008 I believe so. have a go at it yourself first and post what you got so far. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 30, 2008 Share Posted June 30, 2008 I can do it with the temp file but cannot figure out a way without. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 30, 2008 Share Posted June 30, 2008 I was looking more into imagejpeg to see if I could store the jpeg into a variable but all it returns is a bool or I could store it in a file. bool imagejpeg ( resource $image [, string $filename [, int $quality ]] ) so that is completely useless im running out of ideas does anyone know a way without a temp file? Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted June 30, 2008 Share Posted June 30, 2008 I'm working on it... Quote Link to comment Share on other sites More sharing options...
Guest Posted June 30, 2008 Share Posted June 30, 2008 Oh thank you dont go out of your way though I just wondered if someone knew it off there head/ Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted June 30, 2008 Share Posted June 30, 2008 lol, I'm willing to look into it. Educates you, as well as me I want to make sure I understand what your after. You're sending a e-mail through PHP and want to attach a GIF image you have on your webhost? or the image is dynamically made with PHP ? Quote Link to comment Share on other sites More sharing options...
Guest Posted June 30, 2008 Share Posted June 30, 2008 I think im on to somthing I have found this. ob_start(); echo "here is a string"; $string=ob_get_contents(); ob_end_clean(); I am going to try it out then ill let you know what happens. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 30, 2008 Share Posted June 30, 2008 As for your question its a dynamically made gif that im tring to attach. Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted June 30, 2008 Share Posted June 30, 2008 ok, I don't know if that can be used for this circumstance, but I do use it however with headers. As for your question its a dynamically made gif that im tring to attach. ok. That does make it slightly more tricky. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 30, 2008 Share Posted June 30, 2008 It worked perfectly!!! ob_start(); imagejpeg($dst_img); $string=ob_get_contents(); ob_end_clean(); $mail->AddStringAttachment($string, "YourPhoto.jpeg"); $mail->Send(); I am using php mailer to send it out. I am working on putting it up on http://www.usualbeings.com/wallpapers if you want to check on my progress. Its how im sending it to phones. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 30, 2008 Share Posted June 30, 2008 Thank you for your help Quote Link to comment Share on other sites More sharing options...
MasterACE14 Posted June 30, 2008 Share Posted June 30, 2008 no problem, you did all the work Quote Link to comment 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.