Commit f831ad08 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 362996: email_in.pl throws warnings of uninitialized values when no…

Bug 362996: email_in.pl throws warnings of uninitialized values when no content-type is given - Patch by Bill Barry <after.fallout@gmail.com> r=mkanat a=myk
parent 4b060796
...@@ -269,7 +269,7 @@ sub debug_print { ...@@ -269,7 +269,7 @@ sub debug_print {
sub get_body_and_attachments { sub get_body_and_attachments {
my ($email) = @_; my ($email) = @_;
my $ct = $email->content_type; my $ct = $email->content_type || 'text/plain';
debug_print("Splitting Body and Attachments [Type: $ct]..."); debug_print("Splitting Body and Attachments [Type: $ct]...");
my $body; my $body;
...@@ -294,7 +294,7 @@ sub get_text_alternative { ...@@ -294,7 +294,7 @@ sub get_text_alternative {
my @parts = $email->parts; my @parts = $email->parts;
my $body; my $body;
foreach my $part (@parts) { foreach my $part (@parts) {
my $ct = $part->content_type; my $ct = $part->content_type || 'text/plain';
debug_print("Part Content-Type: $ct", 2); debug_print("Part Content-Type: $ct", 2);
if (!$ct || $ct =~ /^text\/plain/i) { if (!$ct || $ct =~ /^text\/plain/i) {
$body = $part->body; $body = $part->body;
......
Markdown is supported
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