Closed
Description
Hello,
I'm trying to use imap-tools with HTTP/HTTPS proxies in a multi-threaded environment. Currently, the workaround is using PySocks with global socket modifications, which isn't thread-safe and causes issues when multiple connections try to use different proxies.
Proposed solution:
- Add proxy support directly to MailBox class
- Support HTTP/HTTPS/SOCKS proxies via PySocks
- Allow per-connection proxy configuration
Example desired usage:
mailbox = MailBox(
"imap.gmail.com",
proxy_type="http",
proxy_host="proxy.example.com",
proxy_port=8080,
proxy_username="user",
proxy_password="pass"
).login(email, password)