zohomail-free
Built by MelkonTech
Documentation · PyPI · GitHub
Read, send, and reply to Zoho Mail emails from Python or the CLI — on a free account.
Zoho locks IMAP/POP3 behind paid plans, so standard email libraries don't work on free accounts. zohomail-free works around this by authenticating via the Zoho web UI and calling their internal API directly — giving you full inbox access and SMTP sending without paying for a plan.
Install
pip install zohomail-free
playwright install chromium
Setup
Create a .env file with your credentials:
ZOHO_EMAIL=you@yourdomain.com
ZOHO_PASSWORD=your_zoho_login_password
ZOHO_REGION=eu # eu or com
# Optional — only needed if you have 2FA enabled on your Zoho account.
# If not set, ZOHO_PASSWORD is used for SMTP sending instead.
ZOHO_APP_PASSWORD=your_app_specific_password
Python
import asyncio
from zohomail import ZohoMailClient, send
client = ZohoMailClient(
email="you@yourdomain.com",
password="your_password",
region="eu",
)
# List inbox
emails = asyncio.run(client.list_emails(limit=5))
for e in emails:
print(e["subject"], "—", e["from"])
# Read a full email
email = asyncio.run(client.read_email(emails[0]["id"]))
print(email["body"])
# Send an email
send(
from_addr="you@yourdomain.com",
app_password="your_app_password",
to=["friend@example.com"],
subject="Hello",
body="Hi there!",
region="eu",
)
CLI
# List inbox
zohomail list
zohomail list --limit 20 --json
# Read a message (get the id from list output)
zohomail read --id 1782000221530004400
# Send a new email
zohomail send --to someone@example.com --subject "Hello" --body "Hi there"
# Reply to an email (preserves threading)
zohomail reply --id 1782000221530004400 --body "Thanks!"
AI integration
Helpers in zohomail.ai make it easy to pipe emails into any LLM without extra dependencies:
import asyncio
from openai import OpenAI
from zohomail import ZohoMailClient
from zohomail.ai import emails_to_messages, email_to_prompt
client = ZohoMailClient(email="you@zoho.com", password="...", region="eu")
emails = asyncio.run(client.list_emails(limit=10))
# Summarise inbox with OpenAI
oai = OpenAI()
resp = oai.chat.completions.create(
model="gpt-4o-mini",
messages=emails_to_messages(emails, system="Summarise these emails briefly."),
)
print(resp.choices[0].message.content)
# Draft a reply with Claude
import anthropic
email = asyncio.run(client.read_email(emails[0]["id"]))
ac = anthropic.Anthropic()
msg = ac.messages.create(
model="claude-sonnet-4-6",
max_tokens=512,
messages=[{"role": "user", "content": email_to_prompt(email, "Write a short reply:")}],
)
print(msg.content[0].text)
Available helpers: email_to_text, email_to_prompt, emails_to_messages, email_to_tool_result.
How it works
Zoho's free plan blocks IMAP/POP3 with ACCESS_RESTRICTED_BY_ZOHOMAIL. However, their web UI talks to an internal JSON API (ml.do / md.do) over HTTPS. This library uses Playwright to authenticate once, saves the session cookie at ~/.zohomail_session.pkl, then makes API calls from within the browser context — no paid plan needed.
On subsequent runs the saved session is reused. If it expires, the library re-authenticates automatically.
Documentation
Full docs at melkontech.github.io/zohomail-free
Author
Built by MelkonTech
License
MIT — see LICENSE
Metadata
Release files for zohomail-free 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| zohomail_free-0.1.5.tar.gz | 13.1 kB | Without provenance | Details for zohomail_free-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zohomail_free-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for zohomail_free-0.1.5-py3-none-any.whl |
Total release size: 26.9 kB
Release files / zohomail_free-0.1.5.tar.gz
| Download URL | zohomail_free-0.1.5.tar.gz |
|---|---|
| Size | 13.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
33d28963b5aa081453a407656719778d34ef365dd29e781a236c332c93a8b2eb
|
|
BLAKE2b-256 checksum How to use checksums |
c35402573c7727e858341555496f0af0847a02aa7507cc1c70129317d8eb4205
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.11
|
Release files / zohomail_free-0.1.5-py3-none-any.whl
| Download URL | zohomail_free-0.1.5-py3-none-any.whl |
|---|---|
| Size | 13.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
817555074c2dfa18b4c827b0a32e11a498c4aecdda9a1eb88591bec71ac4cf18
|
|
BLAKE2b-256 checksum How to use checksums |
7ee1973d67299ed764b56914410a86b2913186027d32934ac2de0781341645e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.11
|
Security for zohomail-free 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.