smtp not authenticating or relaying?

Topics: Core, General, Installing Orchard
Feb 20 at 11:02 AM
This is the web.config settings:

<appSettings>
<add key="log4net.Config" value="Config\log4net.config" />
<add key="webpages:Version" value="2.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="PreserveLoginUrl" value="true" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />   
<add key="smtpServer" value="smtpauth.server.com.au" />
<add key="EnableSsl" value="true" />
<add key="smtpPort" value="25" />
<add key="smtpUser" value="DOMAIN\username" />
<add key="smtpPass" value="password" />
<add key="adminEmail" value="info@domain.com.au" />
</appSettings>
<system.net>
    <mailSettings>
        <smtp deliveryMethod="Network" from="info@domain.com.au">
            <network defaultCredentials="false" host="smtpauth.domain.com.au" password="password" port="25" userName="domain\username" />
        </smtp>
    </mailSettings>
</system.net></configuration>

The error I’m getting:

2014-02-20 18:35:42,536 [367] Orchard.Email.Services.EmailMessagingChannel - An unexpected error while sending a message to info@domain.com.au: OForm_Form_Result
System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.1 Client was not authenticated
at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response)
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 Orchard.Email.Services.EmailMessagingChannel.SendMessage(MessageContext context)
Developer
Feb 22 at 11:19 AM
I'm not sure if the Email module is supposed to be taking settings from the Web.config (actually I'm pretty sure that it shouldn't). Have you tried setting up SMTP credentials from the admin UI?
Feb 23 at 2:48 AM
Thanks Piedone,

I've fixed the problem. Was more the exchange server not wanting the domain included in the username.

Regards,
Paul
Marked as answer by paulking on 2/22/2014 at 7:48 PM