Zoho Mail client for free-tier accounts — no IMAP needed
Project description
zohomail-free
Zoho Mail client for free-tier accounts — no IMAP or POP3 needed.
Zoho locks IMAP/POP3 behind paid plans. This library authenticates via the web UI and uses Zoho's internal API directly, giving you full programmatic access for free.
Install
# from source (PyPI release coming soon)
pip install git+https://github.com/MelkonTech/zohomail-free.git
playwright install chromium
Setup
Copy .env.example to .env and fill in your credentials:
ZOHO_EMAIL=you@yourdomain.com
ZOHO_PASSWORD=your_zoho_login_password
ZOHO_APP_PASSWORD=your_app_specific_password # for sending
ZOHO_REGION=eu # eu or com
Generate an app-specific password in Zoho Mail → Settings → Security → App Passwords.
CLI
# list inbox
zohomail list
zohomail list --limit 20 --json
# read a message (get the id from list output)
zohomail read --id 1782000221530004400
# send new email
zohomail send --to someone@example.com --subject "Hello" --body "Hi there"
# reply to an email
zohomail reply --id 1782000221530004400 --body "Thanks!"
Python
import asyncio
from zohomail.client import ZohoMailClient
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 full email
email = asyncio.run(client.read_email(emails[0]["id"]))
print(email["body"])
Self-hosted API
cp .env.example .env # fill in credentials + set a strong API_KEY
# with Docker
docker build -t zohomail-free .
docker run -p 8000:8000 --env-file .env zohomail-free
# or directly
pip install git+https://github.com/MelkonTech/zohomail-free.git
zohomail-api
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /emails |
List inbox (?limit=10) |
| GET | /emails/{id} |
Read full email |
| POST | /emails/send |
Send new email |
| POST | /emails/{id}/reply |
Reply to email |
| GET | /health |
Health check |
All endpoints require X-API-Key: <your_key> header (set API_KEY in .env).
curl -H "X-API-Key: your_key" http://localhost:8000/emails
Deploy to Railway
- Fork this repo on GitHub
- Go to railway.app → New Project → Deploy from GitHub repo
- Select your fork
- Add environment variables from
.env.examplein Railway's Variables tab - Deploy — Railway auto-detects the Dockerfile
How it works
Zoho's free plan blocks IMAP/POP3 with ACCESS_RESTRICTED_BY_ZOHOMAIL. However, their web UI communicates with an internal JSON API (ml.do / md.do) over HTTPS. This library uses Playwright to authenticate once, saves the session cookie, then makes API calls from within the browser context where cookies are correctly scoped — no paid plan required.
Session cookies are cached at ~/.zohomail_session.pkl and reused on subsequent runs. If the session expires, the library automatically re-authenticates.
License
MIT — see LICENSE
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zohomail_free-0.1.0.tar.gz.
File metadata
- Download URL: zohomail_free-0.1.0.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef5eee98ca586c45602815d111a022b66a71c197f599ad142bc3dd8b821d5208
|
|
| MD5 |
2dd567d58756e12569bd6a4b49971460
|
|
| BLAKE2b-256 |
24aae42b8d35be667d0793806a64f7a8d95edd1fb555f8d59f6492d1fef17c1e
|
File details
Details for the file zohomail_free-0.1.0-py3-none-any.whl.
File metadata
- Download URL: zohomail_free-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7866433af238a9d61086348202a8b2b9bbf73b15aa927b8f2e77e236cce17b40
|
|
| MD5 |
a18ad82b40e20d37816926e2e618fbd9
|
|
| BLAKE2b-256 |
bfe0d087925f9fd31441ce571ca3900e61d40b875f831061053ebdfdc3247137
|