Error while configuring the Email in ERPNext for Office365

After entering all the relvant details, I am not able to configure the email. Getting the above Error. How to resolve this