Skip to main content


1secMail

An API wrapper for www.1secmail.com written in Python.

About

This is a simple Python API wrapper for www.1secmail.com ↗ using the official 1secMail API. It allows you to easily generate temporary email addresses as much as you want and retrieve emails sent to those addresses.

Install

To install this package, you'll need Python 3.8 or above installed on your computer. From your command line:

pip install 1secMail

Note If you're willing to install the development version, do the following:

git clone https://github.com/qvco/1secMail-Python

cd 1secMail-Python

pip install -r requirements.txt

pip install -e .

How To Use

import secmail

client = secmail.Client()

client.random_email(amount=1)[0]
>>> 'vsd2bq6zo3@1secmail.net'

client.custom_email(username="bobby-bob", domain="kzccv.com")
>>> 'bobby-bob@kzccv.com'


# Checking your mailbox:
messages = client.get_messages("bobby-bob@kzccv.com")
for message in messages:
    print(message.id)
    print(message.from_address)
    print(message.subject)
    print(message.date)


# Fetching single message:
message = client.get_message(address="bobby-bob@kzccv.com", message_id=235200687)
print(message.id)
print(message.subject)
print(message.body)
print(message.text_body)
print(message.html_body)
print(message.attachments)
print(message.date)


# Checking attachment informations
for attachment in message.attachments:
    print(attachment.filename)
    print(attachment.content_type)
    print(attachment.size)

Licnese

This software is licensed under the MIT © Qvco.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

1secMail-0.5.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

1secMail-0.5.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file 1secMail-0.5.0.tar.gz.

File metadata

  • Download URL: 1secMail-0.5.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for 1secMail-0.5.0.tar.gz
Algorithm Hash digest
SHA256 ea324a0da721274d4a29743a9045e456f0fb5e7c010d92d1a0f83d0e5c8d349a
MD5 007f793f3bd34181e16a8def0627f57a
BLAKE2b-256 fc4bda2e89a4b05747ea2d1c092385caac74fa18d70de11dbf8cc14959680522

See more details on using hashes here.

File details

Details for the file 1secMail-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: 1secMail-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for 1secMail-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 626d05f3134148ea4e9fb653b948c724b01096a510b420adeebec114f4fe6b89
MD5 b7234c99627334e881834ffa4a277274
BLAKE2b-256 d9be35cd534a27e61b825e9e4be54890e167f77dccf8f93a3a0b2c86c2b72821

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page