Added isAdHocMailGroup flag which can be used to build temporary groups of users to send notifications to. Once the users have been added to the mail queue in WebGUI::Mail::send, the group is deleted.
This commit is contained in:
parent
9a6171c09c
commit
cde696c767
3 changed files with 82 additions and 2 deletions
|
|
@ -489,8 +489,7 @@ sub send {
|
|||
delete $self->{_toGroup};
|
||||
if ($group) {
|
||||
my $group = WebGUI::Group->new($self->session, $group);
|
||||
return $status
|
||||
if !defined $group;
|
||||
return $status if !defined $group;
|
||||
$mail->head->replace("bcc", undef);
|
||||
$mail->head->replace("cc", undef);
|
||||
foreach my $userId (@{$group->getAllUsers(1)}) {
|
||||
|
|
@ -501,6 +500,8 @@ sub send {
|
|||
$self->queue;
|
||||
}
|
||||
}
|
||||
#Delete the group if it is flagged as an AdHocMailGroup
|
||||
$group->delete if ($group->isAdHocMailGroup);
|
||||
}
|
||||
|
||||
return $status;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue