I am inserting texts in a jpg image, which serves as a template.
$jpg_image = imagecreatefromjpeg('images/receipt.jpg');
if ($jpg_image) {
$color = imagecolorallocate($jpg_image, 0, 0, 0);
imagestring($jpg_image,5,570,40,$rn,$color );
imagestring($jpg_image,5,570,110,$tq,$color );
imagejpeg($jpg_image,$filename);
}
I wish to save this edited image temporarily and then send it as an attachment by email. How do I save this file in the local folder (server) and attach in pear mail?