summaryrefslogtreecommitdiff
path: root/tests/mail_to_db.pl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mail_to_db.pl')
-rwxr-xr-xtests/mail_to_db.pl9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/mail_to_db.pl b/tests/mail_to_db.pl
index b758a171c77..fa2af91d9b2 100755
--- a/tests/mail_to_db.pl
+++ b/tests/mail_to_db.pl
@@ -218,7 +218,7 @@ sub process_mail_file
{
chop;
if ($type ne "message")
- {
+ {
if (/^Reply-To: (.*)/i)
{
$type = "reply";
@@ -288,8 +288,11 @@ sub process_mail_file
$values{$type} .= "\n" . $_;
}
}
- $values{'hash'} = checksum("$values{'message'}");
- update_table($dbh, $file_name, \%values);
+ if (defined($values{'message'}))
+ {
+ $values{'hash'} = checksum("$values{'message'}");
+ update_table($dbh, $file_name, \%values);
+ }
}
####