{"id":13937076,"url":"https://github.com/StreetVoice/django-celery-ses","last_synced_at":"2025-07-19T22:33:54.678Z","repository":{"id":5176421,"uuid":"6350221","full_name":"StreetVoice/django-celery-ses","owner":"StreetVoice","description":"Django email backend with AWS SES and Celery","archived":false,"fork":false,"pushed_at":"2024-01-19T03:18:55.000Z","size":60,"stargazers_count":33,"open_issues_count":4,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-03T22:24:11.267Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"foauth/oauth-proxy","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StreetVoice.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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":"2012-10-23T10:00:37.000Z","updated_at":"2024-02-04T18:53:37.000Z","dependencies_parsed_at":"2024-01-07T00:06:44.966Z","dependency_job_id":null,"html_url":"https://github.com/StreetVoice/django-celery-ses","commit_stats":{"total_commits":91,"total_committers":10,"mean_commits":9.1,"dds":"0.39560439560439564","last_synced_commit":"936994042598f55f410f99b3940a25fbea397c2e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StreetVoice%2Fdjango-celery-ses","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StreetVoice%2Fdjango-celery-ses/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StreetVoice%2Fdjango-celery-ses/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StreetVoice%2Fdjango-celery-ses/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StreetVoice","download_url":"https://codeload.github.com/StreetVoice/django-celery-ses/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226693903,"owners_count":17667757,"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":[],"created_at":"2024-08-07T23:03:15.570Z","updated_at":"2024-11-27T05:30:50.491Z","avatar_url":"https://github.com/StreetVoice.png","language":"Python","funding_links":[],"categories":["Email","资源列表","Python"],"sub_categories":["电子邮件"],"readme":"Django Celery SES\n=========================\n\n[![PyPI Version](https://badge.fury.io/py/django-celery-ses.png)](https://pypi.python.org/pypi/django-celery-ses)\n[![Build Status](https://travis-ci.org/StreetVoice/django-celery-ses.png?branch=master)](https://travis-ci.org/StreetVoice/django-celery-ses)\n[![Coverage Status](https://coveralls.io/repos/StreetVoice/django-celery-ses/badge.png?branch=master)](https://coveralls.io/r/StreetVoice/django-celery-ses?branch=master)\n\nDjango Email Backend with Amazon Web Service SES and Celery, developed and used by [StreetVoice](http://streetvoice.com/).\n\n\nThis packages provide a EmailBackend to utilize django-celery to send email. You can just plug the EmailBackend in your project without any modify with your code.\n\nSince Amazon SES requires you to handle Bounce email from SNS notification, django-celery-ses also provides view to handle SNS notification for email address which is blacklisted in Amazon SES.\n\nWhat is provided\n=================\n\n1. Celery EmailBackend\n2. SNS notification handler\n3. Blacklist to handle Bounce email\n\n\nInstallation\n================\n\n1. Install from pip / easy_install\n\n  ```sh\n  $ pip install django-celery-ses\n  ```\n\n2. Add `djcelery_ses` to `INSTALLED_APPS` in `settings.py`\n\n  ```python\n  INSTALLED_APPS = (\n      ...\n      'djcelery_ses',\n      ...\n  )\n  ```\n\n3. migrate the database with South ( you have to install South )\n\n  ```sh\n  $ ./manage.py migrate\n\n  ```\n\n4. Change the `EMAIL_BACKEND`\n\n  ```python\n  EMAIL_BACKEND = 'djcelery_ses.backends.CeleryEmailBackend'\n  ```\n\n5. Add `djcelery_ses` in `urls.py`\n\n  ```python\n  urlpatterns = patterns('',\n      ...\n      (r'^djcelery_ses/', include('djcelery_ses.urls')),\n      ...\n  )\n  ```\n\n\nConfiguration\n===============\n\n`django-celery-ses` uses Amazon SES through SMTP, so you have add `EMAIL_*` configuration in `settings.py`\n\n```python\nEMAIL_USE_TLS = True\nEMAIL_HOST = 'email-smtp.us-east-1.amazonaws.com'\nEMAIL_HOST_USER = '\u003cYOUR_AWS_ACCESS_KEY_ID\u003e'\nEMAIL_HOST_PASSWORD = '\u003cYOUR_AWS_SECRET_ACCESS_KEY\u003e'\nEMAIL_PORT = 587\n\nSERVER_EMAIL = 'StreetVoice \u003cnoreply@streetvoice.com\u003e'\nDEFAULT_FROM_EMAIL = 'StreetVoice \u003cnoreply@streetvoice.com\u003e'\n```\n\nBesides these settings, you also have to setting the SES / SNS on AWS to make this package handle bounce mail for you.\n\n\nHow to use\n=============\n\nAll you have to do is use `send_mail` or `EmailMessage` just like the old time, you don't have to change your code.\n\n\n\nUtilities\n==============\n\nThis package handle Blacklist for you by default, but sometimes, maybe you want to bypass the \"blacklist check\", you can use `pass_blacklist` to pass the \"backlist check\" like this.\n\n```python\nfrom djcelery_ses.utils import pass_blacklist\nfrom django.core.mail import EmailMessage\n\nwith pass_blacklist:\n    msg = EmailMessage('title', 'body content', 'noreply@example.com', ['noreply@example.com'])\n    msg.send()\n```\n\nor in some situations, you don't want the email to send through Celery queue, you can use `no_delay`, for example.\n\n\u003e since version 0.9\n\n```python\nfrom djcelery_ses.utils import no_delay\nfrom django.core.mail import send_mail\n\nwith no_delay:\n    send_mail('title', 'body content', 'noreply@example.com', ['noreply@example.com'])\n```\n\nwith `no_delay` your email will send out directly without Celey queue.\n\n\nTest\n==============\nIn order to ensure your changed which can pass in local environment, please run the script:\n\n```\nmake test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStreetVoice%2Fdjango-celery-ses","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FStreetVoice%2Fdjango-celery-ses","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStreetVoice%2Fdjango-celery-ses/lists"}