mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-09 13:06:14 +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
|
* @param array $attachments list of attachments
|
||||||
* @return false or -1 in case of error, otherwise true
|
* @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()!="") {
|
if(is_object($recipient) && $recipient->isType('user') && !$recipient->isDisabled() && $recipient->getEmail()!="") {
|
||||||
$to = $recipient->getEmail();
|
$to = $recipient->getEmail();
|
||||||
$lang = $recipient->getLanguage();
|
$lang = $recipient->getLanguage();
|
||||||
|
@ -158,6 +158,19 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify {
|
||||||
if($bodyhtml)
|
if($bodyhtml)
|
||||||
$mime->setHTMLBody($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) {
|
if($attachments) {
|
||||||
foreach($attachments as $attachment) {
|
foreach($attachments as $attachment) {
|
||||||
if(!$mime->addAttachment(
|
if(!$mime->addAttachment(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user