Skip to content

Commit

Permalink
Log exceptions from emailing
Browse files Browse the repository at this point in the history
When SendMail throws an exception (e.g. settings.Email is blank), the
details of the exception should be logged.
  • Loading branch information
Zach Richards committed Aug 9, 2019
1 parent 2df8875 commit fb9acfa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Components/EmailTemplateController.vb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Imports Dotnetnuke.Entities.Portals
Imports Dotnetnuke.Entities.Users
Imports DotNetNuke.Framework
Imports DotNetNuke.Security.Roles
Imports DotNetNuke.Services.Exceptions

Namespace Ventrian.NewsArticles

Expand Down Expand Up @@ -289,7 +290,8 @@ Namespace Ventrian.NewsArticles
' SendNotification(settings.Email, sendTo, Null.NullString, subject, template)
Try
DotNetNuke.Services.Mail.Mail.SendMail(settings.Email, sendTo, "", subject, template, "", "", "", "", "", "")
Catch
Catch exc As Exception
LogException(exc)
End Try

End Sub
Expand Down

0 comments on commit fb9acfa

Please sign in to comment.