Scheduled email report exports failing to send due to error - An invalid character was found in the mail header: ';'.
Snow reports are failing to export with the following error logged (C:\Program Files\Snow Software\Logs\ReportExport):
2023-04-27 06:00:01,848 [118] INFO SnowSoftware.LicenseManager.ReportExporterService.ScheduledExportManager [(null)] - Starting scheduled export. (ScheduleID: e7b7fc09-6522-430c-bbdd-4acaffc8d876)2023-04-27 06:00:03,754 [118] ERROR SnowSoftware.LicenseManager.ReportExporterService.ScheduledExportManager [(null)] - Failed to export report.System.FormatException: An invalid character was found in the mail header: ';'. at System.Net.Mail.MailAddressParser.ParseLocalPart(String data, Int32& index, Boolean expectAngleBracket, Boolean expectMultipleAddresses) at System.Net.Mail.MailAddressParser.ParseAddress(String data, Boolean expectMultipleAddresses, Int32& index) at System.Net.Mail.MailAddressParser.ParseAddress(String data) at System.Net.Mail.MailAddress..ctor(String address, String displayName, Encoding displayNameEncoding) at System.Net.Mail.Message..ctor(String from, String to) at System.Net.Mail.MailMessage..ctor(String from, String to) at SnowSoftware.LicenseManager.ReportExporterService.ScheduledExportMailer.SendEmail(ScheduledReportInfo exportInfo, String additionalBody, Attachment attachment) at SnowSoftware.LicenseManager.ReportExporterService.MailReportDelivery.Deliver(IExport export, ScheduledReportInfo scheduledReportInfo) at SnowSoftware.LicenseManager.ReportExporterService.ScheduledExportManager.<ExportAsync>d__23.MoveNext()
Cause
- 2 emails addresses were present in the In the SMACC > Core settings called "NOTIFICATION_SMTP_SENDER" & "REPORT_EXPORT_SMTP_SENDER".
- Both were separated by a semi colon as shown below:
Resolution
- After removing 1 of the 2 email addresses and retesting, the reports are now sending successfully.