Jump to content

[SOLVED] Image to attachment


Guest

Recommended Posts

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?

lol, I'm willing to look into it. Educates you, as well as me  :D

 

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 ?

It worked perfectly!!! ;D

 

	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.

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.