A Python package for generating and interacting with temporary email addresses.
## Installation
You can install the package via pip:
```python
pip install temp_email_automa
```
## Usage
Import the `TempMail` class from the package:
```python
from temp_email_automa.main import TempMail
```
Create an instance of `TempMail` with optional parameters for login and domain. If not provided, a random email address will be generated:
```python
temp_mail = TempMail(login="example", domain="example.com")
```
You can also generate a random email address using:
```python
temp_mail.generate_random_email_address()
```
To get the email address generated or provided:
```python
email_address = temp_mail.email
```
You can get a list of active domains for email addresses using:
```python
active_domains = temp_mail.get_list_of_active_domains()
```
To retrieve a list of emails in the mailbox:
```python
emails = temp_mail.get_list_of_emails()
```
Retrieve a single email by its id:
```python
email_id = 1 # Example id
single_email = temp_mail.get_single_email(email_id)
print(single_email)
```
## Data Structures
The package provides a `Email` data class representing an email message with the following attributes:
- `id`: str
- `sender`: str
- `subject`: str
- `date`: str
- `body`: str
- `textBody`: str
- `htmlBody`: str
Example:
```python
from dataclasses import dataclass
@dataclass
class Email:
id: str
sender: str
subject: str
date: str
body: str
textBody: str
htmlBody: str
```
Raw data
{
"_id": null,
"home_page": "https://github.com/Automa-Automations/temp_email_automa",
"name": "temp-email-automa",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "temp-email automation email",
"author": "Simon Ferns",
"author_email": "business@simonferns.com",
"download_url": "https://files.pythonhosted.org/packages/bb/05/8ac73e821db59627733d27629492bdb1bce16e7f498fe72bfbde9f25fad4/temp_email_automa-0.0.7.tar.gz",
"platform": null,
"description": "A Python package for generating and interacting with temporary email addresses.\n\n## Installation\n\nYou can install the package via pip:\n\n```python\npip install temp_email_automa\n```\n\n## Usage\n\nImport the `TempMail` class from the package:\n\n```python\nfrom temp_email_automa.main import TempMail\n```\n\nCreate an instance of `TempMail` with optional parameters for login and domain. If not provided, a random email address will be generated:\n\n```python\ntemp_mail = TempMail(login=\"example\", domain=\"example.com\")\n```\n\nYou can also generate a random email address using:\n\n```python\ntemp_mail.generate_random_email_address()\n```\n\nTo get the email address generated or provided:\n\n```python\nemail_address = temp_mail.email\n```\n\nYou can get a list of active domains for email addresses using:\n\n```python\nactive_domains = temp_mail.get_list_of_active_domains()\n```\n\nTo retrieve a list of emails in the mailbox:\n\n```python\nemails = temp_mail.get_list_of_emails()\n```\n\nRetrieve a single email by its id:\n\n```python\nemail_id = 1 # Example id\nsingle_email = temp_mail.get_single_email(email_id)\nprint(single_email)\n```\n\n## Data Structures\n\nThe package provides a `Email` data class representing an email message with the following attributes:\n\n- `id`: str\n- `sender`: str\n- `subject`: str\n- `date`: str\n- `body`: str\n- `textBody`: str\n- `htmlBody`: str\n\nExample:\n\n```python\nfrom dataclasses import dataclass\n\n@dataclass\nclass Email:\n id: str\n sender: str\n subject: str\n date: str\n body: str\n textBody: str\n htmlBody: str\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python Package to Provide Temp Emails for AUTOMATION!",
"version": "0.0.7",
"project_urls": {
"Homepage": "https://github.com/Automa-Automations/temp_email_automa"
},
"split_keywords": [
"temp-email",
"automation",
"email"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "bb058ac73e821db59627733d27629492bdb1bce16e7f498fe72bfbde9f25fad4",
"md5": "21c6c3da13758005ab1d6dae576fdb44",
"sha256": "7ce06f183fe65540020a455b7811af41a36a149587feeb1f546032469b478b68"
},
"downloads": -1,
"filename": "temp_email_automa-0.0.7.tar.gz",
"has_sig": false,
"md5_digest": "21c6c3da13758005ab1d6dae576fdb44",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3279,
"upload_time": "2024-03-29T17:51:35",
"upload_time_iso_8601": "2024-03-29T17:51:35.592439Z",
"url": "https://files.pythonhosted.org/packages/bb/05/8ac73e821db59627733d27629492bdb1bce16e7f498fe72bfbde9f25fad4/temp_email_automa-0.0.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-29 17:51:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Automa-Automations",
"github_project": "temp_email_automa",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "temp-email-automa"
}