Unverified Commit f82dde7c authored by Ali Alnubani's avatar Ali Alnubani Committed by GitHub

Bug 1657496: correctly handle MIME type on single-part email (#126)

Backported from 6765ab04774eebf8ea0bd063566240b24ac28f15.
parent 425158e8
......@@ -77,10 +77,10 @@ sub generate_email {
}
my $email = Bugzilla::MIME->new($msg_header);
if (scalar(@parts) == 1) {
$email->content_type_set($parts[0]->content_type);
}
else {
# If there's only one part, we don't need to set the overall content type
# because Email::MIME will automatically take it from that part (bug 1657496)
if (scalar(@parts) > 1) {
$email->content_type_set('multipart/alternative');
# Some mail clients need same encoding for each part, even empty ones.
......
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