1 |
diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm |
2 |
index 18795d735..2075a71e1 100644 |
3 |
--- a/Bugzilla/BugMail.pm |
4 |
+++ b/Bugzilla/BugMail.pm |
5 |
@@ -495,10 +495,10 @@ sub _generate_bugmail { |
6 |
} |
7 |
|
8 |
my $email = Bugzilla::MIME->new($msg_header); |
9 |
- if (scalar(@parts) == 1) { |
10 |
- $email->content_type_set($parts[0]->content_type); |
11 |
- } |
12 |
- else { |
13 |
+ |
14 |
+ # If there's only one part, we don't need to set the overall content type |
15 |
+ # because Email::MIME will automatically take it from that part (bug 1657496) |
16 |
+ if (scalar(@parts) > 1) { |
17 |
$email->content_type_set('multipart/alternative'); |
18 |
|
19 |
# Some mail clients need same encoding for each part, even empty ones. |