diff --git a/MessageBuilder.cs b/MessageBuilder.cs index 31e367f..32e495f 100644 --- a/MessageBuilder.cs +++ b/MessageBuilder.cs @@ -356,7 +356,7 @@ internal static void AddBodypart(this MailMessage message, Bodypart part, string // (i.e. spam) mails like to omit content-types so we don't check for that here and just // assume it's text. if (String.IsNullOrEmpty(message.Body) && - part.Disposition.Type != ContentDispositionType.Attachment) { + part.Type == S22.Imap.ContentType.Text) { message.Body = encoding.GetString(bytes); message.BodyEncoding = encoding; message.IsBodyHtml = part.Subtype.ToLower() == "html"; @@ -370,8 +370,7 @@ internal static void AddBodypart(this MailMessage message, Bodypart part, string // Many attachments are missing the disposition-type. If it's not defined as alternative // and it has a name attribute, assume it is Attachment rather than an AlternateView. if (part.Disposition.Type == ContentDispositionType.Attachment || - (part.Disposition.Type == ContentDispositionType.Unknown && - preferAlternative == false && hasName)) + (preferAlternative == false && hasName)) message.Attachments.Add(CreateAttachment(part, bytes)); else message.AlternateViews.Add(CreateAlternateView(part, bytes));