hi all
i'm working send mail with attach img.
if img have in my directory, It send.
But if i send mail, i use <input type='file' name='attach_file'>, It not send.
i want when i attach img, it send my outlook. pls help me.
source here:
example.php
<form action="sendmail">
<input type="file" name="file_img" value="<?echo $file_img?>">
</form>
sendmail.php
require "maillib.php";
$toText ="ttyen76@yahoo.com";
$subject="test image";
$m= new Mail;
$m->From($email);
$m->To($toText);
$m->Subject($subject);
if ($fimg=fopen("attach_img.jpg", 'wb'))
{
fwrite($fimg, $file_img);
fclose($fimg);
$m->Attach( "attach_img.jpg", "image" );
}
// Sending Email.....
$m->Send();
echo "thanks your send mail";
exit();