您好,我无法发送带附件的邮件我的代码:
$sendername ='Admin';
$senderemail ='kraj@seasiaconsulting.com';
$recipentemail = 'kraj@seasiaconsulting.com';
$se = new Zend_Service_Amazon_Ses_Email();
$mail = new Zend_Service_Amazon_Ses_Email();
$mail->setBodyHtml($message);
$mail->setFrom($senderemail,$sendername);
$mail->addTo($recipentemail,$recipentname);
$mail->addCc($senderemail,$sendername);
$mail->setReturnPath($senderemail);
$mail->setSubject($subject);
//attachments code
if($filesPathArray){
//$at = new Zend_Mime_Part($filesPathArray["pdf"]);
$at = new Zend_Mime_Part($filesPathArray["pdf"]);
$at->type = 'pdf';
//$at->filename = basename($filesPathArray["pdf"]);
$at->filename = $filesPathArray["pdf_name"];
$at->disposition = Zend_Mime::DISPOSITION_INLINE;
$at->encoding = Zend_Mime::ENCODING_BASE64;
$mail->addAttachment($at);
}
$ses = new Zend_Service_Amazon_Ses();
$messageId = $ses->sendEmail($mail);