Skip to content

Commit

Permalink
Fixed issue #16160: (Email to user group does not work)fix has been d…
Browse files Browse the repository at this point in the history
…one already in master. Since develop differs from master, fix has to be done again at this point.
  • Loading branch information
Trischi80 committed Apr 22, 2020
1 parent fcbecd1 commit 756eb45
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion application/models/UserGroup.php
Expand Up @@ -487,7 +487,7 @@ public function sendUserEmails($ugid, $subject, $body, $copy){
$cnt = 0;
foreach ($usersInGroup as $userInGroup) {
/**@var $userInGroup UserInGroup */
$mailer = \LimeMailer::getInstance(); // To reset error
/* Set just needed part */
$mailer->setTo($userInGroup->users->email, $userInGroup->users->users_name);
$sendEmailSuccessErrors[$cnt]['username'] = $userInGroup->users->users_name;
if ($mailer->sendMessage()) {
Expand All @@ -497,6 +497,7 @@ public function sendUserEmails($ugid, $subject, $body, $copy){
$sendEmailSuccessErrors[$cnt]['msg'] = sprintf(gT("Email to %s failed. Error Message : %s"),
\CHtml::encode("{$userInGroup->users->users_name} <{$userInGroup->users->email}>"), $mailer->getError());
}
$mailer->ErrorInfo = '';
$cnt++;
}

Expand Down

2 comments on commit 756eb45

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 :)

@olleharstedt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, will merge then.

Please sign in to comment.