mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 09:35:00 +00:00
images can be passed to toIndividual() for adding it to the html part
This commit is contained in:
parent
aa8eb38560
commit
35b8b9b703
|
@ -83,7 +83,7 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify {
|
|||
* @param array $attachments list of attachments
|
||||
* @return false or -1 in case of error, otherwise true
|
||||
*/
|
||||
function toIndividual($sender, $recipient, $subject, $messagekey, $params=array(), $attachments=array()) { /* {{{ */
|
||||
function toIndividual($sender, $recipient, $subject, $messagekey, $params=array(), $attachments=array(), $images=array()) { /* {{{ */
|
||||
if(is_object($recipient) && $recipient->isType('user') && !$recipient->isDisabled() && $recipient->getEmail()!="") {
|
||||
$to = $recipient->getEmail();
|
||||
$lang = $recipient->getLanguage();
|
||||
|
@ -158,6 +158,19 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify {
|
|||
if($bodyhtml)
|
||||
$mime->setHTMLBody($bodyhtml);
|
||||
|
||||
if($images) {
|
||||
foreach($images as $image) {
|
||||
if(!$mime->addHTMLImage(
|
||||
$image['file'],
|
||||
$image['mimetype'],
|
||||
isset($image['name']) ? $image['name'] : '',
|
||||
isset($image['isfile']) ? $image['isfile'] : true
|
||||
)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($attachments) {
|
||||
foreach($attachments as $attachment) {
|
||||
if(!$mime->addAttachment(
|
||||
|
|
Loading…
Reference in New Issue
Block a user