Troncage du sujet après les 255 premiers caractères
This commit is contained in:
parent
c6cea9d36e
commit
0a3b5d51df
|
@ -136,8 +136,13 @@ my($header) = $transaction->header();
|
||||||
#'touch' this message :-))
|
#'touch' this message :-))
|
||||||
$header->add("X-Sql-Log-ID",$mail_id);
|
$header->add("X-Sql-Log-ID",$mail_id);
|
||||||
|
|
||||||
|
my $subject = scalar $header->get("Subject");
|
||||||
|
chomp($subject);
|
||||||
|
# Only keep the first 255 chars to be sure it can be inserted in the table
|
||||||
|
$subject= substr $subject, 0, 254;
|
||||||
|
|
||||||
my($statement) = "UPDATE ".$mail_table." SET subject=".
|
my($statement) = "UPDATE ".$mail_table." SET subject=".
|
||||||
$dbh->quote(scalar $header->get("Subject")).
|
$dbh->quote($subject).
|
||||||
",header_size=".$dbh->quote(length($header->as_string())).
|
",header_size=".$dbh->quote(length($header->as_string())).
|
||||||
",body_size=".$dbh->quote($transaction->body_size()).
|
",body_size=".$dbh->quote($transaction->body_size()).
|
||||||
" WHERE mail_id=".$mail_id;
|
" WHERE mail_id=".$mail_id;
|
||||||
|
|
Loading…
Reference in New Issue