PLz HElp me....
Posted: Fri Jun 26, 2009 9:44 am
i want to send an email with an image(with text embedding in it).. There will be five pictures user can choose any one of them.. user can also input the text. user can also generate the font embedding features in it...after all that, the picture with embedded text will send to the email(this is also an user input.)..basically it is an dynamically generated e-card... i can't configure it.. any one plz help me...i m in real trouble....
mycode is given below..............
plz rply me in this email id..somdev1001@gmail.com
mycode is given below..............
Code: Select all
<?php
$text = $_GET['message'];
$source1= $_GET['source'];
//$text2 = "hello somdev";
// create an image with width 100px, height 20px
//$image = imagecreate(100, 20);
// create a red colour for the background
// as it is the first call to imagecolorallocate(), this fills the background automatically
//$red_background = imagecolorallocate($image, 255, 0, 0);
$image = ImageCreateFromPNG($source1);
// create a black colour for writing on the image
$black = imagecolorallocate($image, 0, 0, 0);
// write the string "vdhri.net" on the image
// the top left of the text is at the position (10, 2)
imagestring($image, 4, 10, 2, $text, $black);
// output the image
// tell the browser what we’re sending it
header('Content-type: image/png');
// output the image as a png
imagepng($image);
// tidy up
imagedestroy($image);
include('mimemail.inc.php');
$mail->senderName = "Somdev Sarkar";
$mail->senderMail = "bapisom1001@gmail.com";
$mail->bcc = "bapi_som_1001@yahoo.co.in";
$mail->subject = "This is the subject line";
$mail->body = "abcd.php";
//$mail->attachments[] = "2008_1215first0055.jpg";
//$mail->attachments[] = "2008_1215first0012.jpg";
$mail->create();
$recipients ='somdev1001@gmail.com';
if(!$mail->send($recipients))
echo $mail->error;
error_reporting(E_WARNING);
?>
plz rply me in this email id..somdev1001@gmail.com