You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In converting an email that has plain text, but empty html text, the BodyBuilder.ToMessageBody() will return an empty body flagged as IsHTML, instead of the Plain Text and Flagged as IsPlain
Platform (please complete the following information):
Describe the bug
In converting an email that has plain text, but empty html text, the BodyBuilder.ToMessageBody() will return an empty body flagged as IsHTML, instead of the Plain Text and Flagged as IsPlain
Platform (please complete the following information):
To Reproduce
Steps to reproduce the behavior:
BodyBuilder bodyBuilder = new MimeKit.BodyBuilder();
bodyBuilder.TextBody = "hello world";
bodyBuilder.HtmlBody = "";
Console.Out.WriteLine(BodyBuild.ToMessageBody());
Expected behavior
{Content-Type: text/plain; charset=utf-8
hello world}
Content: {MimeKit.MimeContent}
ContentBase: null
ContentDisposition: null
ContentDuration: null
ContentId: null
ContentLocation: null
ContentMd5: null
ContentObject: {MimeKit.MimeContent}
ContentTransferEncoding: Default
ContentType: {Content-Type: text/plain; charset="utf-8"}
FileName: null
Headers: {MimeKit.HeaderList}
IsAttachment: false
IsEnriched: false
IsFlowed: false
IsHtml: false
IsPlain: true
IsRichText: false
Text: "hello world"
OR
{Content-Type: multipart/alternative; boundary="=-IBNbMcf6MOJgOQ7NgeFvKg=="
--=-IBNbMcf6MOJgOQ7NgeFvKg==
Content-Type: text/plain; charset=utf-8
hello world
--=-IBNbMcf6MOJgOQ7NgeFvKg==
Content-Type: text/html; charset=utf-8
Content-Id: NR2XI6PGJ8U4.2QQ28EBFN34A1@ATL01L24788
--=-IBNbMcf6MOJgOQ7NgeFvKg==--
}
Boundary: "=-IBNbMcf6MOJgOQ7NgeFvKg=="
ContentBase: null
ContentDisposition: null
ContentId: null
ContentLocation: null
ContentType: {Content-Type: multipart/alternative; boundary="=-IBNbMcf6MOJgOQ7NgeFvKg=="}
Count: 0x00000002
Epilogue: null
Headers: {MimeKit.HeaderList}
HtmlBody: "xxx"
IsAttachment: false
IsReadOnly: false
Preamble: null
TextBody: "hello world"
Results View: Expanding the Results View will enumerate the IEnumerable
Actual
{Content-Type: text/html; charset=utf-8
Content-Id: F0TUDLOGJ8U4.Z29WI0NZAH401@ATL01L24788
}
Content: {MimeKit.MimeContent}
ContentBase: null
ContentDisposition: null
ContentDuration: null
ContentId: "F0TUDLOGJ8U4.Z29WI0NZAH401@ATL01L24788"
ContentLocation: null
ContentMd5: null
ContentObject: {MimeKit.MimeContent}
ContentTransferEncoding: Default
ContentType: {Content-Type: text/html; charset="utf-8"}
FileName: null
Headers: {MimeKit.HeaderList}
IsAttachment: false
IsEnriched: false
IsFlowed: false
IsHtml: true
IsPlain: false
IsRichText: false
Text: ""
The text was updated successfully, but these errors were encountered: