Getting the error [Errno 111] Connection refused, in an attempt to connect to the site mail.ru via the imaplib library

84 Views Asked by At

I made a telegram bot that receives messages from the mail at the user's request mail.ru . Uploaded the project to pythonanywhere, but when trying to receive messages, the error [Errno 111] Connection refused occurs. As far as I understand mail.ru is not in the "allowlist" list. Is it possible to fix this error if I have a free account or I have to buy a paid subscription?

The code I am trying to run is this:

import imaplib
imap = imaplib.IMAP4_SSL(imap_server)
imap.login(username, mail_pass)
imap.select(search_folder)
0

There are 0 best solutions below