Overview
The customer is unable to send an E-mail notification to users even though the SMTP configuration is correct and valid.
The logs write the following stack trace:
2019-04-01 21:42:39,483 [thecamsystem-com][Thread:30][ERROR] Dnn.PersonaBar.Servers.Services.ServerSettingsSmtpHostController - System.ArgumentException: The parameter 'address' cannot be an empty string.
Parameter name: address
at System.Net.Mail.MailAddress..ctor(String address, String displayName, Encoding displayNameEncoding)
at DotNetNuke.Services.Mail.Mail.SendMail(String mailFrom, String mailSender, String mailTo, String cc, String bcc, String replyTo, MailPriority priority, String subject, MailFormat bodyFormat, Encoding bodyEncoding, String body, List`1 attachments, String smtpServer, String smtpAuthentication, String smtpUsername, String smtpPassword, Boolean smtpEnableSSL)
at DotNetNuke.Services.Mail.Mail.SendMail(String mailFrom, String mailTo, String cc, String bcc, String replyTo, MailPriority priority, String subject, MailFormat bodyFormat, Encoding bodyEncoding, String body, List`1 attachments, String smtpServer, String smtpAuthentication, String smtpUsername, String smtpPassword, Boolean smtpEnableSSL)
at Dnn.PersonaBar.Servers.Services.ServerSettingsSmtpHostController.SendTestEmail(SendTestEmailRequest request)
The above stack trace indicates that the 'address' parameter is empty. In order to confirm this, please execute the following SQL query:
SELECT * FROM HostSettings WHERE SettingName = 'HostEmail';
By default, the above query should return an e-mail address under the 'SettingValue' column. This value is generated during the DNN installation wizard process, specifically the Email address field.
Environment
DNN 9.x
Root Cause
The root cause of the issue is due to HostEmail
value in HostSettings
table is empty.
Resolution
- Take a database backup for safety precaution.
- Execute the SQL query below to update the data.
UPDATE HostSettings Set SettingValue = '<insert Host Email Address Here>' WHERE SettingName = 'HostEmail';
- Refresh the cache and recycle the application pool
Comments
0 comments
Article is closed for comments.