{"id":16452845,"url":"https://github.com/vitalk/flask-mailer","last_synced_at":"2025-10-27T07:30:39.755Z","repository":{"id":5426960,"uuid":"6618954","full_name":"vitalk/flask-mailer","owner":"vitalk","description":"A Flask extension for sending email messages","archived":false,"fork":false,"pushed_at":"2015-05-14T20:27:20.000Z","size":588,"stargazers_count":5,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-01T04:05:07.897Z","etag":null,"topics":["flask","mail"],"latest_commit_sha":null,"homepage":"https://pypi.python.org/pypi/Flask-Mailer","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/vitalk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","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":"2012-11-09T19:43:25.000Z","updated_at":"2018-04-13T13:59:17.000Z","dependencies_parsed_at":"2022-09-26T22:01:11.002Z","dependency_job_id":null,"html_url":"https://github.com/vitalk/flask-mailer","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitalk%2Fflask-mailer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitalk%2Fflask-mailer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitalk%2Fflask-mailer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitalk%2Fflask-mailer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vitalk","download_url":"https://codeload.github.com/vitalk/flask-mailer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238455241,"owners_count":19475415,"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":["flask","mail"],"created_at":"2024-10-11T10:13:58.150Z","updated_at":"2025-10-27T07:30:34.471Z","avatar_url":"https://github.com/vitalk.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Flask-Mailer\n============\n\nA Flask extension for sending email messages. Includes different mailer\nbackends for different purposes:\n\n- Dummy backend (useful for tests)\n- SMTP backend (SMTP lib wrapper)\n\n\nInstallation\n------------\n\nInstall from PyPi via `pip`:\n\n```sh\npip install Flask-Mailer\n```\n\n\nConfiguration\n-------------\n\n| Option                  | Description                                                            |\n| ----------------------- | ---------------------------------------------------------------------- |\n| `MAILER_BACKEND`        | Path to mailer backend, e.g. `flask_mailer.backends.smpt.SMTPMailer`   |\n| `MAILER_TESTING`        | Enable dummy backend for testing                                       |\n| `MAILER_HOST`           | Hostname for SMTP backend, e.g. `localhost`                            |\n| `MAILER_PORT`           | Port for SMTP backend, e.g. `25`                                       |\n| `MAILER_USERNAME`       | Username for SMTP backend                                              |\n| `MAILER_PASSWORD`       | Password for SMTP backend                                              |\n| `MAILER_DEFAULT_SENDER` | Default mail sender, e.g. `webmaster`                                  |\n\n\nUsage\n-----\n\n```python\nfrom flask import Flask\nfrom flask_mailer import Mailer, Email\n\napp = Flask(__name__)\nsmtp = Mailer(app)\n\nmail = Email(\n    subject='hi, there',\n    text='awesome message',\n    to=['to@example.com', 'you@example.com'],\n    from_addr='me@example.com'\n)\nsmtp.send(mail)\n```\n\n\nTesting\n-------\n\nSetting to your app `testing` flag automatically enable the dummy mailer\nbackend or you can manually set `MAILER_TESTING` to `True`. On dummy mailer\nall mails on send just append to outbox list:\n\n```python\nsmtp.send(mail)\n\nassert len(smtp.outbox) == 1\nassert smtp.outbox == [mail,]\n```\n\n\nThanks\n------\n\nThe extension inspired and partially reuse the code of the some awesome\nprojects, such as:\n\n- [Flask-Mail](https://github.com/mattupstate/flask-mail)\n- [Django](https://github.com/django/django)\n- [Solace](https://github.com/Plurk/Solace)\n- [reddit](https://github.com/reddit/reddit)\n\nSpecial thanks to their authors and contributors.\n\n\nLicense\n-------\n\nLicensed under the BSD license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitalk%2Fflask-mailer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitalk%2Fflask-mailer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitalk%2Fflask-mailer/lists"}