Integrate firstmail.ltd emails into your Python applications with ease.
Project description
firstmail
Integrate firstmail.ltd emails into your Python applications with ease.
Server Info
- IMAP/POP3 host:
imap.firstmail.ltd - IMAP SSL:
993, POP3 SSL:995 - IMAP non-SSL:
143, POP3 non-SSL:110 - IP:
5.252.35.241
Installation
with pip
pip install firstmail
with uv
uv install firstmail
build from source
git clone https://github.com/nichind/firstmail.git
cd firstmail
pip install -e .
Python Usage
Using the context manager (recommended)
from firstmail import firstmail_client
with firstmail_client("your_email@firstmail.ltd", "your_password") as client:
# Get the most recent email
last_email = client.get_last_mail()
if last_email:
print(last_email.subject, last_email.sender)
# Get multiple emails (newest first)
emails = client.get_all_mail(limit=10)
print(f"Fetched {len(emails)} emails")
Manual resource management
from firstmail import FirstMail
client = FirstMail("your_email@firstmail.ltd", "your_password")
try:
print(client.get_message_count())
finally:
client.close()
Watch for new emails
from firstmail import firstmail_client
with firstmail_client("your_email@firstmail.ltd", "your_password") as client:
for new_email in client.watch_for_new_emails(check_interval=60):
print("New email:", new_email.subject)
# break # optionally exit after the first
CLI
[!NOTE] If the
firstmailcommand isn't working in your terminal, usepython -m firstmail <command>,uv run -m firstmail <command>, etc. instead.
Basic commands
# Read the most recent email
firstmail -e <email> -p <password> read-last
# Read all emails (limit to N)
firstmail -e <email:password> read-all --limit 10 --full
# Watch for new emails
firstmail watch --interval 60 --show-body
# Count messages in inbox
firstmail count
You can also pass credentials explicitly:
firstmail -e your_email@firstmail.ltd -p your_password read-last
Disclaimer
I'm not responsible for possible misuse of this software. Please use it in accordance with the law and respect the terms of service of the services you access.
Consider leaving a star ⭐
Project details
Release history Release notifications | RSS feed
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 firstmail-0.1.2.tar.gz.
File metadata
- Download URL: firstmail-0.1.2.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82993eb85f276b3bbae643279630fae054863dbd44e85a78f42df6036f49566c
|
|
| MD5 |
4c55d68268e31d367eb9363bf066e2dc
|
|
| BLAKE2b-256 |
e972aa6afa09da7de5893d852c32e08928bda7ee409b6fe22502334e5113990c
|
Provenance
The following attestation bundles were made for firstmail-0.1.2.tar.gz:
Publisher:
publish.yml on nichind/firstmail
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
firstmail-0.1.2.tar.gz -
Subject digest:
82993eb85f276b3bbae643279630fae054863dbd44e85a78f42df6036f49566c - Sigstore transparency entry: 552326704
- Sigstore integration time:
-
Permalink:
nichind/firstmail@88b515c9071b5af144f03225a2a4264516aa599f -
Branch / Tag:
refs/tags/0.1.2 - Owner: https://github.com/nichind
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@88b515c9071b5af144f03225a2a4264516aa599f -
Trigger Event:
release
-
Statement type:
File details
Details for the file firstmail-0.1.2-py3-none-any.whl.
File metadata
- Download URL: firstmail-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e398e4fcdd43973b56a08449d89692f95416490517418c31237aadb62ffdeab7
|
|
| MD5 |
be723dece86fa3c4db98d9c55933060a
|
|
| BLAKE2b-256 |
638918fbc35a6e539200176571923a3f21fb7eadd53dc4546c24ee3e98718fdd
|
Provenance
The following attestation bundles were made for firstmail-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on nichind/firstmail
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
firstmail-0.1.2-py3-none-any.whl -
Subject digest:
e398e4fcdd43973b56a08449d89692f95416490517418c31237aadb62ffdeab7 - Sigstore transparency entry: 552326719
- Sigstore integration time:
-
Permalink:
nichind/firstmail@88b515c9071b5af144f03225a2a4264516aa599f -
Branch / Tag:
refs/tags/0.1.2 - Owner: https://github.com/nichind
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@88b515c9071b5af144f03225a2a4264516aa599f -
Trigger Event:
release
-
Statement type: