|
Posted by Daniel Tryba on 07/06/05 18:01
Bob Bedford <bedford1@notforspammershotmail.com> wrote:
> $tempimage = imagejpeg($dst);
> if (!$mail->AddstringAttachment($tempimage,"model.jpg"))
> echo ("<strong>failure attachment file</strong><br>");
>
> Instead of attachment file, I get the failure attachment file message on the
> screen after a lot of text (the jpeg file in text format).
>
> What do I wrong ?
You didn't check the imagejpeg function prototype:
bool imagejpeg ( resource image [, string filename [, int quality]] )
IOW $tempimage does not contain an image (it's a boolean). imagejpeg
output the image directly to the httpd's buffer in your code.
Navigation:
[Reply to this message]
|