You are here: Re: attach imagejpeg to email « PHP Programming Language « IT news, forums, messages
Re: attach imagejpeg to email

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация