Bug 3150: (follow-up) Send list and cart emails immediately again
With this patch set the cart and list emails are sent via the message_queue instead of bypassing it and being sent immediately. This patch keeps them in message_queue, but also sends them immediately, restoring the previous behavior. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
fc5f56f7b6
commit
a184a88cb8
4 changed files with 12 additions and 4 deletions
|
@ -101,7 +101,7 @@ if ( $email_add ) {
|
|||
content => Encode::encode("UTF-8", $iso2709),
|
||||
};
|
||||
|
||||
C4::Letters::EnqueueLetter({
|
||||
my $message_id = C4::Letters::EnqueueLetter({
|
||||
letter => $letter,
|
||||
message_transport_type => 'email',
|
||||
to_address => $email_add,
|
||||
|
@ -109,6 +109,8 @@ if ( $email_add ) {
|
|||
attachments => [$attachment],
|
||||
});
|
||||
|
||||
C4::Letters::SendQueuedMessages({ message_id => $message_id });
|
||||
|
||||
$template->param( SENT => 1 );
|
||||
}
|
||||
$template->param( email_add => $email_add );
|
||||
|
|
|
@ -99,7 +99,7 @@ if ( $email_add ) {
|
|||
content => Encode::encode("UTF-8", $iso2709),
|
||||
};
|
||||
|
||||
C4::Letters::EnqueueLetter({
|
||||
my $message_id = C4::Letters::EnqueueLetter({
|
||||
letter => $letter,
|
||||
message_transport_type => 'email',
|
||||
to_address => $email_add,
|
||||
|
@ -107,6 +107,8 @@ if ( $email_add ) {
|
|||
attachments => [$attachment],
|
||||
});
|
||||
|
||||
C4::Letters::SendQueuedMessages({ message_id => $message_id });
|
||||
|
||||
$template->param( SENT => 1 );
|
||||
}
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ if ( $shelf and $shelf->can_be_viewed( $borrowernumber ) ) {
|
|||
content => Encode::encode("UTF-8", $iso2709),
|
||||
};
|
||||
|
||||
C4::Letters::EnqueueLetter({
|
||||
my $message_id = C4::Letters::EnqueueLetter({
|
||||
letter => $letter,
|
||||
message_transport_type => 'email',
|
||||
borrowernumber => $patron->borrowernumber,
|
||||
|
@ -125,6 +125,8 @@ if ( $shelf and $shelf->can_be_viewed( $borrowernumber ) ) {
|
|||
attachments => [$attachment],
|
||||
});
|
||||
|
||||
C4::Letters::SendQueuedMessages({ message_id => $message_id });
|
||||
|
||||
$template->param( SENT => 1 );
|
||||
}
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ if ($to_address) {
|
|||
content => Encode::encode("UTF-8", $iso2709),
|
||||
};
|
||||
|
||||
C4::Letters::EnqueueLetter({
|
||||
my $message_id = C4::Letters::EnqueueLetter({
|
||||
letter => $letter,
|
||||
message_transport_type => 'email',
|
||||
borrowernumber => $patron->borrowernumber,
|
||||
|
@ -124,6 +124,8 @@ if ($to_address) {
|
|||
attachments => [$attachment],
|
||||
});
|
||||
|
||||
C4::Letters::SendQueuedMessages({ message_id => $message_id });
|
||||
|
||||
$template->param( SENT => 1 );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue