Must be firewall that’s causing the problem?


Here’s a third-party IMAP client library called IMAPClient which is easier
to use . You may want to take a look at it.


http://imapclient.readthedocs.io/en/stable/


Sri

On Thu, Mar 9, 2017 at 11:35 AM, Sreekul Nair <[email protected]>
wrote:

> Dear All,
>
> I have tried to search for related issues in StackOverflow and other python
> forums but to no avail. And I am really growing desperate to resolve this
> issue. I am not sure who would be able to help me if not you guys. Its an
> earnest request to please help me understand what I am doing wrong.
>
> Below is the Python code that I have written to simply log into my Outlook
> 365 server.
>
> import imaplib
> mail = imaplib.IMAP4_SSL('mail.o365.mailserver.com')
> print mail.login('[email protected]', 'MyPassword')
> print('Logged in')
>
> Running this simple program ends in following error -
> File "C:\Python27\lib\imaplib.py", line 520, in login
> raise self.error(dat[-1]) error: LOGIN failed.
>
> I have used Python 2.7.12 & 3.6 but to no avail.
>
> Request help on this issue.
>
> Thanks & regards,
> Sreekul Nair
> _______________________________________________
> Tutor maillist  -  [email protected]
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to