postalsys / imapflow

IMAP Client library for EmailEngine Email API (https://emailengine.app)
https://imapflow.com
Other
350 stars 59 forks source link

Couldnt figure out how to do muiltiple connections at once #178

Closed mananchawla2005 closed 6 months ago

mananchawla2005 commented 6 months ago

I Couldnt figure out how to do muiltiple connections at once. What I want is to listen for idle for multiple email addresses. How can I achieve this? Can you put me in right direction?

andris9 commented 6 months ago

You would have to create multiple ImapFlow objects and connect() them all. Then, open a separate folder for each such connection. Be aware, though, that mail servers actively limit parallel connections. For example, Gmail/Gsuite allows a maximum of 15 connections for the same user. So if the user has other email clients open (desktop Outlook, Mail app on the phone, etc.), then all these connections are shared, and thus, you can use even less than 15 connections.

mananchawla2005 commented 5 months ago

Hey thanks for the reply! Like these multiple imapflow objects would be stored inside an array or something? like how to keep in memory all the active connections