{ "info": { "author": "Jann Kleen", "author_email": "jann.kleen@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "Framework :: Django :: 1.10", "Framework :: Django :: 1.11", "Framework :: Django :: 1.4", "Framework :: Django :: 1.5", "Framework :: Django :: 1.6", "Framework :: Django :: 1.7", "Framework :: Django :: 1.8", "Framework :: Django :: 1.9", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "[![Build Status](https://api.travis-ci.org/resmio/django-sendgrid.png)](https://travis-ci.org/resmio/django-sendgrid) [![Join the chat at https://gitter.im/resmio/django-sendgrid](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/resmio/django-sendgrid?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\nIntroduction\n============\n\nThis django app enables you to send emails to sendgrid and receive callbacks to monitor the status of all your emails. \nYou can also attach them to a related object in your own app. A signal will be dispatched every time a new callback is\nreceived (and also when the email is created for the first time). We also provide helper classes which inherit from the \nemail classes in `django.core.mail` which means you can transparently switch out the django classes with ours. \n\nInstallation\n============\n\n1. `pip install django-sendgrid-webhook`\n2. Add app to INSTALLED_APPS \n\n ```python\n INSTALLED_APPS += 'sendgrid'\n ```\n3. South compatibility (Django < 1.7)\n\n If you're using Django >= 1.7 you don't have to do anything. For users with older versions, South tries to use the new Django migrations instead of the South migrations. Please add the following code snippet to your settings:\n\n ```python\n SOUTH_MIGRATION_MODULES = {\n 'sendgrid': 'sendgrid.south_migrations',\n }\n ```\n4. Run `python manage.py syncdb` to install the new Email model\n5. Include `sendgrid.urls` at some point in your url structure. E.g. in `/urls.py`:\n\n ```python\n # Sendgrid event hooks\n urlpatterns += patterns(\n '',\n url(r'^', include('sendgrid.urls')),\n )\n ```\n \n This will add the callback path `/sendgrid_callback/`.\n6. Go to https://sendgrid.com/app and add the App `Event Notification`.\n7. Configure the App to send the events you'd like to and add the Callback URL. If you included `sendgrid.urls` like \n mentioned above it would be : `http://test.com/sendgrid_callback/`\n\nConfiguration\n=============\n\nOur classes in `sendgrid.utils` are inheriting from the default classes of `django.core.mail`, so you just need to \nconfigure your SMTP settings as shown in https://docs.djangoproject.com/en/dev/topics/email/#smtp-backend to use them. \n\nConfiguration Options\n---------------------\n\nCurrently we only have one configuration option which can be added to the django settings.\n\nAdding `SENDGRID_EVENTS_IGNORE_MISSING = True` to your settings will silently ignore callbacks for emails which are \nsent without a UUID. This is very helpful because Sendgrid would otherwise receive a non-200 answer from our webhook\nand would try to re-deliver the same message for 24h until giving up sending messages altogether. So unless you're \nvery sure this will never happen, you should probably enable this.\n\nUsage\n=====\n\nIn theory you can send messages yourself by adding a UUID parameter to the `unique_args` parameter in the SMTP header \n`X-SMTPAPI` as specified in https://sendgrid.com/docs/API_Reference/SMTP_API/unique_arguments.html . But you can also \nsave yourself the work and read the next section.\n\nSending emails (the easy way)\n-----------------------------\n\n`sendgrid.utils.SendgridEmailMessage` and `sendgrid.utils.SendgridEmailMultiAlternatives` can be used instead of the\nDjango versions in `django.core.mail`. In fact the easiest transition is to just replace every use of \n`from django.core.mail import EmailMessage` with `from sendgrid.utils import SendgridEmailMessage as EmailMessage`.\nFrom then on every email you send will include an UUID parameter to track the callback, and a new instance of the \nmodel `sendgrid.models.Email` will be created and updated on every callback received.\n\nYou can also attach a related object to the `Email` object by passing an `obj` parameter in the `.send()` function of\n`SendgridEmailMessage` or `SendgridEmailMultiAlternatives`.\n\nSignals\n-------\n\nEvery time a new object is created or a callback is received, the signal `sendgrid.signals.email_event` is dispatched.\nSee https://docs.djangoproject.com/en/dev/topics/signals/ for more details on Django signals.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/resmio/django-sendgrid", "keywords": "", "license": "BSD 2-Clause", "maintainer": "", "maintainer_email": "", "name": "django-sendgrid-webhook", "package_url": "https://pypi.org/project/django-sendgrid-webhook/", "platform": "", "project_url": "https://pypi.org/project/django-sendgrid-webhook/", "project_urls": { "Homepage": "https://github.com/resmio/django-sendgrid" }, "release_url": "https://pypi.org/project/django-sendgrid-webhook/0.3.0/", "requires_dist": null, "requires_python": "", "summary": "A small django app around sendgrid and its webhooks", "version": "0.3.0" }, "last_serial": 2819252, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "d7f4d85db5fa8f9f734b6bc2fd808e18", "sha256": "5e15a79b10cbcac10bc24e03c520861c3fb45af17d6aac5ef10c57dd09770614" }, "downloads": -1, "filename": "django-sendgrid-webhook-0.1.0.tar.gz", "has_sig": false, "md5_digest": "d7f4d85db5fa8f9f734b6bc2fd808e18", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10330, "upload_time": "2014-11-28T12:14:23", "url": "https://files.pythonhosted.org/packages/21/54/dd54ec337e715202e477fea86d49096120093e2dbecab0deb847483ecb40/django-sendgrid-webhook-0.1.0.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "ee08048cc5de65b0eb64d219d5dd6b86", "sha256": "0e480ce347638c6ef2b92a889c333b5e3fe7195bcb90af6f3a4f027374ca4999" }, "downloads": -1, "filename": "django-sendgrid-webhook-0.2.2.tar.gz", "has_sig": false, "md5_digest": "ee08048cc5de65b0eb64d219d5dd6b86", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10673, "upload_time": "2015-03-23T17:49:16", "url": "https://files.pythonhosted.org/packages/81/39/e115f92daec5c46a6f2af7791f74250c732cefea291268c4b7a0fec705e7/django-sendgrid-webhook-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "43ffb62a65fdcc30d485eb85c4b4564c", "sha256": "df0d244949ef4d40fb03b3e76f24369ba448f933e3325c38793706c430cbd92e" }, "downloads": -1, "filename": "django-sendgrid-webhook-0.2.3.tar.gz", "has_sig": false, "md5_digest": "43ffb62a65fdcc30d485eb85c4b4564c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10708, "upload_time": "2016-11-29T11:26:33", "url": "https://files.pythonhosted.org/packages/ed/03/e89c58d130541f3bef7b095410dc8b39e9813bffdf97e445e1191f5e4d7f/django-sendgrid-webhook-0.2.3.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "9f8c11a1a105343098276a8f797ed289", "sha256": "159d5152dcee65da2ac6c6c3a9e80e7422ce50135866917f3e0b91e73dfb1b69" }, "downloads": -1, "filename": "django-sendgrid-webhook-0.3.0.tar.gz", "has_sig": false, "md5_digest": "9f8c11a1a105343098276a8f797ed289", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10778, "upload_time": "2017-04-21T12:08:35", "url": "https://files.pythonhosted.org/packages/56/6f/4bb7dc12adca6e70e675cb1398183b1c49e415c78a7193441899d49395ae/django-sendgrid-webhook-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9f8c11a1a105343098276a8f797ed289", "sha256": "159d5152dcee65da2ac6c6c3a9e80e7422ce50135866917f3e0b91e73dfb1b69" }, "downloads": -1, "filename": "django-sendgrid-webhook-0.3.0.tar.gz", "has_sig": false, "md5_digest": "9f8c11a1a105343098276a8f797ed289", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10778, "upload_time": "2017-04-21T12:08:35", "url": "https://files.pythonhosted.org/packages/56/6f/4bb7dc12adca6e70e675cb1398183b1c49e415c78a7193441899d49395ae/django-sendgrid-webhook-0.3.0.tar.gz" } ] }