if ( $RT::MailCommand eq 'sendmailpipe' ) {
eval {
- open( MAIL, "|$RT::SendmailPath $RT::SendmailArguments" ) || die $!;
- print MAIL $MIMEObj->as_string;
- close(MAIL);
+ open( my $mail, "|$RT::SendmailPath $RT::SendmailArguments" ) || die $!;
+ $MIMEObj->print($mail);
+ close($mail);
};
if ($@) {
$RT::Logger->crit( $msgid . "Could not send mail. -" . $@ );
FIELD => 'TransactionId',
VALUE => $self->TransactionObj->Id
);
- $attachments->OrderBy('id');
+ $attachments->OrderBy( FIELD => 'id');
my $transaction_content_obj = $self->TransactionObj->ContentObj;
# If there is one, and we can parse it, then base our Message-ID on it
if ($msgid
- and $msgid =~ s/<(rt-.*?-\d+-\d+)\.(\d+-0-0)\@$RT::Organization>$/
+ and $msgid =~ s/<(rt-.*?-\d+-\d+)\.(\d+)-\d+-\d+\@\Q$RT::Organization\E>$/
"<$1." . $self->TicketObj->id
. "-" . $self->ScripObj->id
. "-" . $self->ScripActionObj->{_Message_ID}