NullReferenceException when loading mail body to HTML document

Hi GemBox Team,

in my application I am using GemBox.Bundle version 47.0.1024 to convert mails to images.
Within my workflow I load the mail body into an HTML document and this step throws a NullReferenceException when being executed with specific mails (file format is eml).

My application code:

var message = MailMessage.Load(filepath);
var document = new DocumentModel();
document.Content.End.LoadText(message.BodyHtml, LoadOptions.HtmlDefault);

Is this behaviour fixed with the new GemBox.Bundle version 47.0.1036?
I sent you the file for reproduction to info@gemboxsoftware.com.

Kind regards,
Sarah

Maybe this is the same behaviour as in HTML table content only loaded within html tag - #11 by Sarah ?

Hi Sarah,

Please try again with this bugfix:
https://www.gemboxsoftware.com/document/nightlybuilds/GBD35v1385.zip

Or this NuGet package:
Install-Package GemBox.Document -Version 35.0.1385-hotfix

Does this solve your issue?

Regards,
Mario

Hi Mario,

The fixed version solves my issue, thank you :slight_smile:
Since I am working with the GemBox.Bundle: do you already know, when will the fix be available as part of the GemBox.Bundle Nuget package?

Kind regards,
Sarah

Hi Sarah,

We now also have pre-released hidden GemBox.Bundle releases on NuGet.

Please use this latest NuGet package:
Install-Package GemBox.Bundle -Version 47.0.1069-hotfix

Regards,
Mario

1 Like