Commit 5d1089ff authored by sunnavy's avatar sunnavy
Browse files

refactor email sent failure system error txn to use the same tech as Attachment Truncate/Drop.

it's more simple and secure: by specifying ActivateScrips to 0, it won't cause infinite-loop,
which could happen if the system error txn triggers some scrips to send mails.
parent 4aaa1324
......@@ -1771,9 +1771,10 @@ sub IsCorrectAction {
sub _RecordSendEmailFailure {
my $ticket = shift;
if ($ticket) {
$ticket->_RecordNote(
NoteType => 'SystemError',
Content => "Sending the previous mail has failed. Please contact your admin, they can find more details in the logs.",
$ticket->_NewTransaction(
Type => "SystemError",
Data => "Sending the previous mail has failed. Please contact your admin, they can find more details in the logs.", #loc
ActivateScrips => 0,
);
return 1;
}
......
......@@ -839,7 +839,7 @@ sub _FormatUser {
},
SystemError => sub {
my $self = shift;
return ("System error"); #loc()
return $self->Data // ("System error"); #loc()
},
AttachmentTruncate => sub {
my $self = shift;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment