{"id":13424695,"url":"https://github.com/sabuhish/fastapi-mail","last_synced_at":"2025-05-14T00:06:42.380Z","repository":{"id":38034715,"uuid":"236163572","full_name":"sabuhish/fastapi-mail","owner":"sabuhish","description":"Fastapi mail system sending mails(individual, bulk) attachments(individual, bulk)","archived":false,"fork":false,"pushed_at":"2025-03-06T04:28:09.000Z","size":832,"stargazers_count":785,"open_issues_count":18,"forks_count":90,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-05-12T07:43:27.109Z","etag":null,"topics":["fastapi","fastapi-mail","fastmail"],"latest_commit_sha":null,"homepage":"https://sabuhish.github.io/fastapi-mail/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sabuhish.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-25T11:52:29.000Z","updated_at":"2025-05-10T04:03:45.000Z","dependencies_parsed_at":"2023-02-15T22:35:43.139Z","dependency_job_id":"30ebf002-8a3c-491a-8daf-3576df68b738","html_url":"https://github.com/sabuhish/fastapi-mail","commit_stats":{"total_commits":222,"total_committers":43,"mean_commits":5.162790697674419,"dds":"0.48198198198198194","last_synced_commit":"a4aff1acd9ba98ef84ada493b922aad3ae95115d"},"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabuhish%2Ffastapi-mail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabuhish%2Ffastapi-mail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabuhish%2Ffastapi-mail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabuhish%2Ffastapi-mail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sabuhish","download_url":"https://codeload.github.com/sabuhish/fastapi-mail/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254043565,"owners_count":22004973,"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":["fastapi","fastapi-mail","fastmail"],"created_at":"2024-07-31T00:00:57.989Z","updated_at":"2025-05-14T00:06:42.286Z","avatar_url":"https://github.com/sabuhish.png","language":"Python","funding_links":[],"categories":["Third-Party Extensions","Packages","Email"],"sub_categories":["Email"],"readme":"\n# Fastapi-mail\n\nThe fastapi-mail is a simple lightweight mail system, for sending emails and attachments(individual \u0026\u0026 bulk)\n\n\n[![MIT licensed](https://img.shields.io/github/license/sabuhish/fastapi-mail)](https://raw.githubusercontent.com/sabuhish/fastapi-mail/master/LICENSE)\n[![GitHub stars](https://img.shields.io/github/stars/sabuhish/fastapi-mail.svg)](https://github.com/sabuhish/fastapi-mail/stargazers)\n[![GitHub forks](https://img.shields.io/github/forks/sabuhish/fastapi-mail.svg)](https://github.com/sabuhish/fastapi-mail/network)\n[![GitHub issues](https://img.shields.io/github/issues-raw/sabuhish/fastapi-mail)](https://github.com/sabuhish/fastapi-mail/issues)\n[![Downloads](https://pepy.tech/badge/fastapi-mail)](https://pepy.tech/project/fastapi-mail)\n\n\n###  🔨  Installation ###\n\n\n```bash\npython3 -m venv .venv\n\nsource .venv/bin/activate\n\npip install fastapi-mail\n\nfor aioredis and httpx\n\npip install 'fastapi-mail[aioredis]'\npip install 'fastapi-mail[httpx]'\n\n```\n\nAlternatively, if you prefer to use `poetry` for package dependencies:\n\n```bash\npoetry shell\n\npoetry add fastapi-mail\n\nfor aioredis and httpx\n\npoetry add 'fastapi-mail[aioredis]'\npoetry add 'fastapi-mail[httpx]'\n```\n\n---\n**Documentation**: [FastApi-MAIL](https://sabuhish.github.io/fastapi-mail/)\n---\n\n\nThe key features are:\n\n-  sending emails either with FastApi or using asyncio module \n-  sending emails using FastApi background task managment\n-  sending files either from form-data or files from server\n-  Using Jinja2 HTML Templates\n-  email utils (utility allows you to check temporary email addresses, you can block any email or domain)\n-  email utils has two available classes ```DefaultChecker``` and  ```WhoIsXmlApi```\n-  Unittests using FastapiMail\n\nMore information on [Getting-Started](https://sabuhish.github.io/fastapi-mail/getting-started/)\n\n\n### Guide\n\n\n```python\n\nfrom typing import List\n\nfrom fastapi import BackgroundTasks, FastAPI\nfrom fastapi_mail import ConnectionConfig, FastMail, MessageSchema, MessageType\nfrom pydantic import BaseModel, EmailStr\nfrom starlette.responses import JSONResponse\n\n\n\nclass EmailSchema(BaseModel):\n    email: List[EmailStr]\n\n\nconf = ConnectionConfig(\n    MAIL_USERNAME =\"username\",\n    MAIL_PASSWORD = \"**********\",\n    MAIL_FROM = \"test@email.com\",\n    MAIL_PORT = 465,\n    MAIL_SERVER = \"mail server\",\n    MAIL_STARTTLS = False,\n    MAIL_SSL_TLS = True,\n    USE_CREDENTIALS = True,\n    VALIDATE_CERTS = True\n)\n\napp = FastAPI()\n\n\nhtml = \"\"\"\n\u003cp\u003eThanks for using Fastapi-mail\u003c/p\u003e \n\"\"\"\n\n\n@app.post(\"/email\")\nasync def simple_send(email: EmailSchema) -\u003e JSONResponse:\n\n    message = MessageSchema(\n        subject=\"Fastapi-Mail module\",\n        recipients=email.dict().get(\"email\"),\n        body=html,\n        subtype=MessageType.html)\n\n    fm = FastMail(conf)\n    await fm.send_message(message)\n    return JSONResponse(status_code=200, content={\"message\": \"email has been sent\"})     \n```\n\n## List of Examples\n\nFor more examples of using fastapi-mail please check: \n[example](https://sabuhish.github.io/fastapi-mail/example/) section.\n\n\n## Contributors ✨\n\nThanks goes to these wonderful\n[People](https://github.com/sabuhish/fastapi-mail/blob/master/contributors.txt)\n\n\n# Contributing\nContributions of any kind are welcome!\n\nBefore you start, please read [CONTRIBUTING](https://github.com/sabuhish/fastapi-mail/blob/master/CONTRIBUTING.md)\n\n\n## LICENSE\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsabuhish%2Ffastapi-mail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsabuhish%2Ffastapi-mail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsabuhish%2Ffastapi-mail/lists"}