View Single Post
  #1 (permalink)  
Old 05-13-06, 09:21 AM
nitro4file nitro4file is offline
Newbie Coder
 
Join Date: Jan 2006
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
How to email an image created on fly???

Hi All,

am trying to email an image created on fly, i can email any image file etc but dunno how to do it for an image i php create.

my current code for email with attach.

PHP Code:




<?
$file 
"address.gif";
$fp fopen($file"r");
$file2 fread($fpfilesize($file));

$file2 chunk_split(base64_encode($file2));

$subject ="Image Email";
$sender "***@****.***";


$formsend mail("***@*****.***""$subject""$file2""From: $sender\r\nMIME-Version: 1.0\r\nContent-type: image/gif; name=address\r\nReply-to:$sender\r\nContent-Transfer-Encoding: base64"); 


?>
Okay the above code work and send my email with attached (address.gif),
Now i have a php suppose dynamicAddress.php, which work as follows:

dynamicAddress.php?town=20&city=10&address=somewhe re+road+etc

dynamicAddress.php fetch data from mysql and output a custom image on the screen,

Now how do i give user the possibility to email them this image which has just been created??

Thanks in advance for your reponse

Cheers
Nitro
Reply With Quote