i am using zend mail for mailing purpose in my web site. In this mail i add a image attachment function. The mail sent successfully but i can't view image from my inbox. They said that unsupported file format.
This is my code
$attach_path = image path
$transport = new Zend_Mail_Transport_Smtp('sanple', $config);
$mail = new Zend_Mail('UTF-8');
$mail->setBodyHtml($message);
$fileContents = file_get_contents($attach_path);
$at = $mail->createAttachment($fileContents);
$at->type = 'image/jpeg';
$at->filename = 'test.jpg';
$mail->setFrom('customersupport@testing.com', 'customersupport@testing.com');
$mail->addTo('customersupport@testing.com','customersupport@testing.com');
$mail->setSubject($subject);
$mail->send($transport);
if anything wrong in this.please help me
Thanks in advance.