Skip to content

Commit

Permalink
Avoid creating a multipart/mixed with just 1 child.
Browse files Browse the repository at this point in the history
Fixes issue #441
  • Loading branch information
jstedfast committed Oct 11, 2018
1 parent 275fa75 commit 2ed6491
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions MimeKit/BodyBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ public MimeEntity ToMessageBody ()
}

if (Attachments.Count > 0) {
if (body == null && Attachments.Count == 1)
return Attachments[0];

var mixed = new Multipart ("mixed");

if (body != null)
Expand Down

0 comments on commit 2ed6491

Please sign in to comment.