Description of bug
The email function to send Admin Logs returns a 500 Error even if SMTP is configured and tested to be working.

Steps to reproduce
- Enable SMTB, test that it's working correctly
- Open Manage=> Admin Logs

- Select some log lines, click 'Email Selected', and attempt to send the email
=> Email fails to send with a server error.
Current behavior
When attempting to email admin logs, it fails with a server error.
Expected behavior
It should be possible to email admin logs.
Screenshots
(posted inline above)
Error information
{
"Message": "An error has occurred.",
"ExceptionMessage": "Cannot import nodes of type 'Document'.",
"ExceptionType": "System.InvalidOperationException",
"StackTrace": " at System.Xml.XmlDocument.ImportNodeInternal(XmlNode node, Boolean deep)\r\n at Dnn.PersonaBar.AdminLogs.Components.AdminLogsController.GetExceptions(IEnumerable`1 logIds) in C:\\DNN\\Dnn.Platform\\Dnn.AdminExperience\\Dnn.PersonaBar.Extensions\\Components\\AdminLogs\\AdminLogsController.cs:line 270\r\n at Dnn.PersonaBar.AdminLogs.Components.AdminLogsController.EmailLogItems(String subject, String fromEmailAddress, String toEmailAddress, String message, IEnumerable`1 logItemIds, String& error) in C:\\DNN\\Dnn.Platform\\Dnn.AdminExperience\\Dnn.PersonaBar.Extensions\\Components\\AdminLogs\\AdminLogsController.cs:line 224\r\n at Dnn.PersonaBar.AdminLogs.Services.AdminLogsController.EmailLogItems(EmailLogItemsRequest request) in C:\\DNN\\Dnn.Platform\\Dnn.AdminExperience\\Dnn.PersonaBar.Extensions\\Services\\AdminLogsController.cs:line 182"
}
Additional context
It fails at line 270 of AdminLogsController:
var objNode = objXml.ImportNode(xmlDoc, true);
should be:
var objNode = objXml.ImportNode(xmlDoc.DocumentElement, true);
I'll have a PR up to fix this shortly.
Affected version
Occurs in at least 9.10 and 9.11, code hasn't been changed recently so will occur in any alpha builds too
Affected browser
Any
Description of bug
The email function to send Admin Logs returns a 500 Error even if SMTP is configured and tested to be working.
Steps to reproduce
=> Email fails to send with a server error.
Current behavior
When attempting to email admin logs, it fails with a server error.
Expected behavior
It should be possible to email admin logs.
Screenshots
(posted inline above)
Error information
Additional context
It fails at line 270 of AdminLogsController:
should be:
I'll have a PR up to fix this shortly.
Affected version
Occurs in at least 9.10 and 9.11, code hasn't been changed recently so will occur in any alpha builds too
Affected browser
Any