{"id":19584905,"url":"https://github.com/krypton-byte/xtempmail","last_synced_at":"2025-04-27T11:33:04.518Z","repository":{"id":45796145,"uuid":"424883657","full_name":"krypton-byte/xtempmail","owner":"krypton-byte","description":"📨 Disposable Email (Python Library)","archived":false,"fork":false,"pushed_at":"2023-07-18T09:01:01.000Z","size":7214,"stargazers_count":21,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-07T09:17:42.625Z","etag":null,"topics":["asynchronous","autoreply","disposable-email","email","library","lightweight","python","tempmail","tempmail-api","temporary"],"latest_commit_sha":null,"homepage":"https://xtempmail.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krypton-byte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-05T08:54:29.000Z","updated_at":"2024-08-29T11:05:28.000Z","dependencies_parsed_at":"2023-02-09T18:46:25.531Z","dependency_job_id":null,"html_url":"https://github.com/krypton-byte/xtempmail","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krypton-byte%2Fxtempmail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krypton-byte%2Fxtempmail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krypton-byte%2Fxtempmail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krypton-byte%2Fxtempmail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krypton-byte","download_url":"https://codeload.github.com/krypton-byte/xtempmail/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223994884,"owners_count":17237954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asynchronous","autoreply","disposable-email","email","library","lightweight","python","tempmail","tempmail-api","temporary"],"created_at":"2024-11-11T07:51:33.121Z","updated_at":"2024-11-11T07:51:34.067Z","avatar_url":"https://github.com/krypton-byte.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Unittest](https://github.com/krypton-byte/xtempmail/actions/workflows/typing.yml/badge.svg)](https://github.com/krypton-byte/xtempmail/actions/workflows/typing.yml)\n[![Upload to PyPi](https://github.com/krypton-byte/xtempmail/actions/workflows/release.yml/badge.svg)](https://github.com/krypton-byte/xtempmail/actions/workflows/release.yml)\n[![Downloads](https://pepy.tech/badge/xtempmail)](https://pepy.tech/project/xtempmail)\n# Temporary Mail\nTempmail client for \u003ca href='https://tempmail.plus'\u003etempmail.plus\u003c/a\u003e\n\n## Installation\n```python\n$ pip install git+https://github.com/krypton-byte/xtempmail\n```\n\n## Feature\n\u003cul\u003e\n    \u003cli\u003e Custom Name/Mail\u003c/li\u003e\n    \u003cli\u003e Reply/send Message(support attachment file)\u003c/li\u003e\n    \u003cli\u003e Read Message (support Download attachment file)\u003c/li\u003e\n    \u003cli\u003e Delete message\u003c/li\u003e\n    \u003cli\u003e Destroy Inbox\u003c/li\u003e\n    \u003cli\u003e Lock Inbox\u003c/li\u003e\n    \u003cli\u003e Unlock Inbox\u003c/li\u003e\n    \u003cli\u003e Generate Secret Inbox\u003c/li\u003e\n    \u003cli\u003e Asynchronous\u003c/li\u003e\n    \u003cli\u003e Synchronous\u003c/li\u003e\n\u003c/ul\u003e\n\n## Example\n```\nexample/main.py\n```\n\n## Usage Sync\n```python\nfrom xtempmail import Email, extension\nimport logging\nfrom xtempmail.mail import EmailMessage, EMAIL\nlog = logging.getLogger('xtempmail')\nlog.setLevel(logging.INFO)\napp = Email(name='krypton', ext=ext=EMAIL.MAILTO_PLUS))\n\n@app.on.message()\ndef baca(data: EmailMessage):\n    print(f\"\\tFrom: {data.from_mail}\\n\\tSubject: {data.subject}\\n\\tBody: {data.text}\\n\\tReply -\u003e Delete\")\n    ok = []\n    for i in data.attachments: # -\u003e Forward attachment\n        ok.append(( i.name, i.download()))\n    if data.from_is_local:\n        data.from_mail.send_message(data.subject, data.text, multiply_file=ok) # -\u003e Forward message\n    data.delete()  #delete message\n\n@app.on.message(lambda msg:msg.attachments)\ndef get_message_media(data: EmailMessage):\n    print(f'Attachment: {[i.name for i in data.attachments]}')\n\n@app.on.message(lambda x:x.from_mail.__str__().endswith('@gmail.com'))\ndef getGmailMessage(data: EmailMessage):\n    print(f'Gmail: {data.from_mail}')\n\n\nif __name__ == '__main__':\n    try:\n        app.listen_new_message(1)\n    except KeyboardInterrupt:\n        app.destroy() #destroy inbox\n```\n\n## Usage Async\n```python\n\nimport asyncio\nimport logging\nfrom xtempmail.aiomail import EMAIL, EmailMessage, Email\nlog = logging.getLogger('xtempmail')\nlog.setLevel(logging.INFO)\napp = Email(name='krypton', ext=EMAIL.MAILTO_PLUS)\n@app.on.message()\nasync def baca(data: EmailMessage):\n    print(f\"\\tFrom: {data.from_mail}\\n\\tSubject: {data.subject}\\n\\tBody: {data.text}\\n\\tReply -\u003e Delete\")\n    ok = []\n    for i in data.attachments: # -\u003e Forward attachmen\n        ok.append(( i.name, await i.download()))\n    if data.from_is_local:\n        await data.from_mail.send_message(data.subject, data.text, multiply_file=ok) # -\u003e Forward message\n    await data.delete()  #delete message\n\n@app.on.message(lambda msg:msg.attachments)\nasync def get_message_media(data: EmailMessage):\n    print(f'Attachment: {[i.name for i in data.attachments]}')\n\n@app.on.message(lambda x:x.from_mail.__str__().endswith('@gmail.com'))\nasync def getGmailMessage(data: EmailMessage):\n    print(f'Gmail: {data.from_mail}')\n\nif __name__ == '__main__':\n    try:\n        loop = asyncio.new_event_loop()\n        loop.run_until_complete(app.listen())\n    except Exception:\n        asyncio.run(app.destroy())\n\n\n```\n\n## Demo\n\u003cimg src=\"assets/res.webp\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrypton-byte%2Fxtempmail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrypton-byte%2Fxtempmail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrypton-byte%2Fxtempmail/lists"}