I am sending an email with an attachment(image) using php function sendmail,
the mail sending is successful, image is also attached to the mail.
But when I open the image file it won't open, it just shows "No preview available."
And the file name that is attached to email is part1.2, though the file that I attach has a diff name.
define('DISPLAY_XPM4_ERRORS', true); // display XPM4 errors
require_once 'C:/AppServ/www/abcde/mail/MAIL.php'; // path to 'MAIL.php' file from XPM4 package
$m = new MAIL; // initialize MAIL class
$m->From('firstname.lastname@example.org'); // set from address
$m->AddTo('email@example.com'); // add to address
$m->Subject('Verification request.'); // set subject
$m->Text("$name has requested verification. \nAttached image for verification."); // set text message