diff options
author | Dave Miller <github@justdave.net> | 2021-12-16 18:45:25 -0500 |
---|---|---|
committer | Dave Miller <github@justdave.net> | 2022-08-23 21:25:14 -0400 |
commit | e36e9f902af57e26a3ae0e14ceb9dff78857989f (patch) | |
tree | 380c7b6477841cef6715977e370673c49e7d0b6b | |
parent | ed982add9de2a110b94f443e1f52fb339ea9c8e7 (diff) | |
download | bugs-e36e9f902af57e26a3ae0e14ceb9dff78857989f.tar bugs-e36e9f902af57e26a3ae0e14ceb9dff78857989f.tar.gz bugs-e36e9f902af57e26a3ae0e14ceb9dff78857989f.tar.bz2 bugs-e36e9f902af57e26a3ae0e14ceb9dff78857989f.tar.xz bugs-e36e9f902af57e26a3ae0e14ceb9dff78857989f.zip |
Bug 1657496: correctly handle MIME type on single-part email. r=eseyman, a=justdave
-rw-r--r-- | Bugzilla/BugMail.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index 110a1ffaf..fdcbc9d5a 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -467,9 +467,10 @@ sub _generate_bugmail { } 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. $email->charset_set('UTF-8') if $use_utf8; |