I'm using class.upload.php to resize an image from a form and I would like to use the resized image on the fly to send it with phpMailer but my code below is not working ;((
The image is not send !
Without sending a mail the resize image works fine ;))
Thanks for your help...
$handle = new upload($_FILES['file']);
if ($handle->uploaded) {
//$handle->file_new_name_body = 'image_resized';
$handle->image_resize = true;
$handle->image_x = 200;
$handle->image_ratio_y = true;
$handle->image_no_enlarging = true;
$handle->jpeg_quality = 50;
$attach = base64_encode($handle->process());
$mail->AddAttachment($attach, 'myimage.jpg');
}