Skip to content

Commit 6765ab0

Browse files
committed
Bug 1657496: correctly handle MIME type on single-part email. r=eseyman, a=justdave
1 parent 230d73a commit 6765ab0

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Bugzilla/BugMail.pm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -495,10 +495,10 @@ sub _generate_bugmail {
495495
}
496496

497497
my $email = Bugzilla::MIME->new($msg_header);
498-
if (scalar(@parts) == 1) {
499-
$email->content_type_set($parts[0]->content_type);
500-
}
501-
else {
498+
499+
# If there's only one part, we don't need to set the overall content type
500+
# because Email::MIME will automatically take it from that part (bug 1657496)
501+
if (scalar(@parts) > 1) {
502502
$email->content_type_set('multipart/alternative');
503503

504504
# Some mail clients need same encoding for each part, even empty ones.

0 commit comments

Comments
 (0)