locked
Outlook Autodiscover SMTP authentication RRS feed

  • Question

  • 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

    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>me@test.nl</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>me@test.nl</LoginName>
    <SPA>off</SPA>
    <SSL>off</SSL>
    <AuthRequired>on</AuthRequired>
    <SMTPLast>on</SMTPLast>
    </Protocol>
    </Account>
    </Response>
    </Autodiscover>
    • Edited by MickBerkhout Saturday, February 6, 2016 7:02 PM Post was duplicated
    Saturday, February 6, 2016 7:01 PM

Answers

  • Does any of your settings get accepted or is it only missing the setting to authenticate?
    Your entire XML-file probably is being rejected and Auto Account Setup is currently using Guess Smart to get the settings for your mail server.

    Anyway, remove the 2 instances of:

    <DomainRequired>on</DomainRequired>

    This is not required when the user can logon with his/her email address.

    Also remove the 2 instances of:

    <LoginName>me@test.nl</LoginName>

    This is not required as the email address is specified during Auto Account Setup by the user and the user can login with his/her email address to your server.

    Additionally remove;

    <SMTPLast>on</SMTPLast>

    This is only required when you don't enable SMTP authentication and your mail server can authenticate the SMTP session via the active POP3/IMAP receive session.

    Lastly, at the top add the required XML declaration:

    <?xml version="1.0" encoding="utf-8" ?>




    Robert Sparnaaij [MVP-Outlook]
    Outlook guides and more: HowTo-Outlook.com
    Outlook Quick Tips: MSOutlook.info

    • Marked as answer by MickBerkhout Sunday, February 7, 2016 3:41 PM
    Sunday, February 7, 2016 3:27 PM

All replies

  • Does any of your settings get accepted or is it only missing the setting to authenticate?
    Your entire XML-file probably is being rejected and Auto Account Setup is currently using Guess Smart to get the settings for your mail server.

    Anyway, remove the 2 instances of:

    <DomainRequired>on</DomainRequired>

    This is not required when the user can logon with his/her email address.

    Also remove the 2 instances of:

    <LoginName>me@test.nl</LoginName>

    This is not required as the email address is specified during Auto Account Setup by the user and the user can login with his/her email address to your server.

    Additionally remove;

    <SMTPLast>on</SMTPLast>

    This is only required when you don't enable SMTP authentication and your mail server can authenticate the SMTP session via the active POP3/IMAP receive session.

    Lastly, at the top add the required XML declaration:

    <?xml version="1.0" encoding="utf-8" ?>




    Robert Sparnaaij [MVP-Outlook]
    Outlook guides and more: HowTo-Outlook.com
    Outlook Quick Tips: MSOutlook.info

    • Marked as answer by MickBerkhout Sunday, February 7, 2016 3:41 PM
    Sunday, February 7, 2016 3:27 PM
  • Hi Robert,

    Thanks for the reply! 

    I have just tested the changes and it worked!

    I deleted those instances:

    <DomainRequired>on</DomainRequired>
    

    and the instance of

    <SMTPLast>on</SMTPLast>
    

    However, I could not delete the LoginName instance. Deleting the instance will give a prompt pop-up for the username and password (our server requires authentication via the full e-mail address. Not only the name. Eg: mick@test.com instead of mick). 

    The XML declaration was already there. However I forgot to mention it in my post.

    Thank you so much for the solution. If someone else comes with the same problem, here is my XML code:

    <xml version="1.0" encoding="utf-8" >
    <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.com></Server>
    <Port>143</Port>
    <SPA>off</SPA>
    <SSL>off</SSL>
    <LoginName>test@test.com</LoginName>
    <AuthRequired>on</AuthRequired>
    </Protocol>
    <Protocol>
    <Type>SMTP</Type>
    <Server>mail.test.co,</Server>
    <Port>587</Port>
    <SPA>off</SPA>
    <SSL>off</SSL>
    <AuthRequired>on</AuthRequired>
    <LoginName>test@test.com</LoginName>
    <UsePOPAuth>on</UsePOPAuth>
    </Protocol>
    </Account>
    </Response>
    </Autodiscover>

    Sunday, February 7, 2016 3:41 PM
  • Good to hear and you're welcome! :-)


    Robert Sparnaaij [MVP-Outlook]
    Outlook guides and more: HowTo-Outlook.com
    Outlook Quick Tips: MSOutlook.info

    Sunday, February 7, 2016 5:18 PM
  • Hi,

    the XML file works fine for me. 

    Do you also have a sample of a JSON file required to autoconfigure Outlook 2018 on IOS? I can see that the app does an HTTP request to autodiscover.json but I could not find any documentation on the structure of that JSON file. I tried converting my XML file to JSON but that did not work - Outlook on IOS would not pick up the server, port, description etc. from the JSON file - I figured out how to specify the server type as IMAP but that's about it. Any documentation or sample JSON file you can provide to auto configure an IMAP server with Outlook 2018 on IOS?

    Thank you.

    Kind regards

    Sebastian

    Wednesday, May 16, 2018 6:07 AM