I am trying to send email with zip file attachment using zend framework. but always i send it go to junk directory of my email.
Here is attached code i used.
I don't know what is the problem please help me to find this. Thanks a lot.
$mail = new Zend_Mail();
$mail->setType(Zend_Mime::MULTIPART_RELATED);
$mail->setBodyHtml($email_body);
$mail->setFrom('admin@website.com', 'Stephen Nolan');
$mail->addTo($_POST['email'], 'Kamalifestyle Client');
$mail->setSubject('Thanks From Kamalifestyle, See Attachment');
$attachment = $mail->createAttachment(file_get_contents($currentFile));
$attachment->type = 'zip';
$attachment->filename = "completebook.zip";
if ($mail->send()) {
unlink($currentFile);
echo 'Message Sent';
?>
<?php
} else {
echo 'Error Sending ';
}