lukencode / FluentEmail

All in one email sender for .NET. Supports popular senders (SendGrid, MailGun, etc) and Razor templates.
https://lukelowrey.com/dotnet-email-guide-2021/
MIT License
3.02k stars 434 forks source link

fix ReplaceRenderer class. Method Parse, NullReferenceException #356

Open wangengzheng opened 1 year ago

wangengzheng commented 1 year ago

close #355

wangengzheng commented 1 year ago

The original intention of the adjustment is that when the model attribute is assumed to be null after release, it is difficult to find obvious errors in the corresponding stack

System.NullReferenceException: Object reference not set to an instance of an object.
   at FluentEmail.Core.Defaults.ReplaceRenderer.Parse[T](String template, T model, Boolean isHtml)
   at FluentEmail.Core.Defaults.ReplaceRenderer.ParseAsync[T](String template, T model, Boolean isHtml)