Mick
Mick

Reputation: 184

Outlook Autodiscover SMTP authentication

The problem

I am trying to create an autodiscover script for the users of my website. Currently I am creating a working connection to my mail-server, however my mail server requires SMTP authentication. I am currently sending:

  <AuthRequired>on</AuthRequired>

in the full XML file to enable SMTP authentication. This enables the checkmark in the details next to "My outgoing server (SMTP) requires authentication". The bullet list with the two options "use same settings as my incoming mail server" (prefered) or "Log on using" has no option selected.

What I've tried

I have tried adding the POP3 information and putting the following attribute in my SMTP part:

<UsePOPAuth>on</UsePOPAuth>

However that did not work. To create the XML file I have used the following URL: https://technet.microsoft.com/en-us/library/cc511507.aspx

My current XML document

<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
<Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
<Account>
<AccountType>email</AccountType>
<Action>settings</Action>
<Protocol>
<Type>IMAP</Type>
<Server>mail.test.nl</Server>
<Port>143</Port>
<DomainRequired>on</DomainRequired>
<LoginName>[email protected]</LoginName>
<SPA>off</SPA>
<SSL>off</SSL>
<AuthRequired>on</AuthRequired>
</Protocol>
<Protocol>
<Type>SMTP</Type>
<Server>mail.test.nl</Server>
<Port>587</Port>
<DomainRequired>on</DomainRequired>
<LoginName>[email protected]</LoginName>
<SPA>off</SPA>
<SSL>off</SSL>
<AuthRequired>on</AuthRequired>
<SMTPLast>on</SMTPLast>
</Protocol>
</Account>
</Response>
</Autodiscover>

Upvotes: 3

Views: 2332

Answers (1)

Dany Khalife
Dany Khalife

Reputation: 1850

I found a very useful article on TechNet which basically explains why this is happening. From what i understood, specifying the SMTPLast property makes Outlook attempt to login to POP/IMAP before SMTP, without actually authenticating SMTP (some servers such as my school's only work this way).

I reproduced the same problem you had with that config but once i removed it, it worked like a charm.

I noticed there isn't a lot of useful documentation about Autodiscover, aka POX autodiscover so here's the xml template that worked for me:

<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
    <Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
        <User>
            <DisplayName>First Last</DisplayName>
        </User>
        <Account>
            <AccountType>email</AccountType>
            <Action>settings</Action>
            <Protocol>
                <Type>IMAP</Type>
                <Server>mail.example.com</Server>
                <Port>993</Port>
                <AuthRequired>on</AuthRequired>
                <LoginName>[email protected]</LoginName>
                <SPA>off</SPA>
                <SSL>on</SSL>
            </Protocol>
            <Protocol>
                <Type>SMTP</Type>
                <Server>mail.example.com</Server>
                <Port>587</Port>
                <AuthRequired>on</AuthRequired>
                <LoginName>[email protected]</LoginName>
                <SPA>off</SPA>
                <Encryption>TLS</Encryption>
                <UsePOPAuth>on</UsePOPAuth>
            </Protocol>
        </Account>
    </Response>
</Autodiscover>

Upvotes: 4

Related Questions