Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $mh = Loader::helper('mail');
- $zmo = $mh->getMailerObject();
- $zm = $zmo['mail'];
- $zm->setType(Zend_Mime::MULTIPART_RELATED);
- $zm->setBodyText('This is the text of the mail.');
- $zm->setFrom('noreplay@server.net', 'Some Sender');
- $zm->addTo('sendTo@gmail.com', 'Some Recipient');
- $zm->setSubject('Zend TestSubject');
- $fh = Loader::helper('file');
- $image = $fh->getContents( File::getByID(19) );
- $at = new Zend_Mime_Part($image);
- $at->type = 'image/jpeg';
- $at->disposition = Zend_Mime::DISPOSITION_INLINE;
- $at->encoding = Zend_Mime::ENCODING_BASE64;
- $at->filename = 'justFileName.jpg';
- $zm->addAttachment($at);
- $zm->send();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement