This is for anyone working with Office 365 and the latest version of Outlook having problems with setting up a new or existing email account.
At the time of writing it is not clear whether this bug relates to something that Office 365 Outlook is doing, or within the hosting we are using. What we do know is under certain circumstances an email account that can be accessed with a known password using the webmail interface (https://stackmail.com) cannot be set up in Outlook when using Office 365. This type of problem can drive you mad and waste hours.
Circumstances
You have just installed the latest version of Office 365 on your computer, and you wish to connect with an existing or very recently set up email account. You know the email account works, you know the password and you know the email address, and have accessed it ok through webmail (https://stackmail.com).
When you try to auto set this up in Outlook, or use the manual instructions I have provided it reports an error. It does not matter what you change in terms of ports and encryption protocols, it reports an error every time.
Resolution
1). Firstly, make absolutely sure that the email address and password combination works by logging into stackmail.com. Do that even if you are 100% sure.
2). Go back to Outlook configuration and try it again using exactly the same information for the email address and the password. You should be able to use Auto settings. If that does not work, use the last guide I created for Outlook.
3). If it did not work. Stop trying to resolve it in Outlook. Go back into webmail and locate the setting which allows you to change your password through webmail. When you locate it, overwrite the old password with THE SAME PASSWORD. Yes I know that is counterintuitive. It forces the encoding of the password to be re-performed in the hosting. It also ensures any other email accounts you are using will still work without any modification.
4). Go back into Outlook, it is probably best to delete any partially set up account and start again. You will find that it will work this time.
Make sure any local IT person working in your office is aware of this if they run into problems. This problem does not occur all of the time withe latest version of Office 365, but it happened to me last weekend while setting up a new PC, and I have at least one other case like this. It is very odd. The hosting company when they watch the protocol exchange observe that the password you are using is rejected, probably because Outlook is not using the right key exchange protocol or encoding. Resetting the password seems to resolve it.