Configuring the SMTP settings on a DotNetNuke website I received an error related to relaying, when testing the configuration.
There has been an error trying to send the test email. The error is: The message was not delivered to the following address(es) -
The error is somewhat succinct, not providing any details upon which to work to resolve the error.
The actual error was relay related. A more detailed error description is logged in the site log. Here’s part of the error message:
The server response was: relay not permitted at System.Net.Mail.SmtpTransport.SendMail
To view this this navigate to Admin/Event Viewer, from the top navigation bar.
Message: System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The server response was: relay not permitted at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, Boolean allowUnicode, SmtpFailedRecipientException& exception) at System.Net.Mail.SmtpClient.Send(MailMessage message) at DotNetNuke.Services.Mail.Mail.SendMailInternal(MailMessage mailMessage, String subject, String body, MailPriority priority, MailFormat bodyFormat, Encoding bodyEncoding, IEnumerable`1 attachments, String smtpServer, String smtpAuthentication, String smtpUsername, String smtpPassword, Boolean smtpEnableSSL)
A relay error created by a mail server implies that the server has not been configured to handle emails for a particular domain.
This can occur if the DotNetNuke website has been configured to send emails through a particular mail account, with the sender email account configured for a different domain.
The difference could be created by using a .co.uk email address with a .com mail server.
Ensure that the master admin account (as defined under Admin/Site Settings is configured to be the same domain as the mail account for the outgoing emails under the Host Settings. This email account is used for most of the emails originating from the website.
I have also had to amend the email address defined under the Host Details section of the first page of the Host Settings, to ensure that it is of the same domain.
Below is given an example of the configuration for the SMTP configuration, passing emails through a given mail account.
SMTP Server and port: SMTP Authentication:AnonymousBasicNTLM SMTP Enable SSL: SMTP Username: SMTP Password:
The main admin account for the website is configured, ensuring that the domain used is consistent.
User Name:AdminUser Display Name: Email Address:


