{ "info": { "author": "Maykin Media", "author_email": "info@maykinmedia.nl", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "=====\nUsage\n=====\n\ndjango-mailer-2 is asynchronous so in addition to putting mail on the queue you\nneed to periodically tell it to clear the queue and actually send the mail.\n\nThe latter is done via a command extension.\n\n\nPutting Mail On The Queue (Django 1.2 or higher)\n=================================================\n\nIn settings.py, configure Django's EMAIL_BACKEND setting like so:\n\n EMAIL_BACKEND = 'django_mailer.smtp_queue.EmailBackend'\n\nIf you don't need message priority support you can call send_mail like\nyou normally would in Django::\n\n send_mail(subject, message_body, settings.DEFAULT_FROM_EMAIL, recipients)\n\nIf you need prioritized messages, create an instance of EmailMessage\nand specify {'X-Mail-Queue-Priority': ''} in the ``headers`` parameter,\nwhere is one of:\n\n 'now' - do not queue, send immediately\n 'high' - high priority\n 'normal' - standard priority - this is the default.\n 'low' - low priority\n\nIf you don't specify a priority, the message is sent at 'normal' priority.\n\n\nPutting Mail On The Queue (Django 1.1 or earlier)\n=================================================\n\nBecause django-mailer currently uses the same function signature as Django's\ncore mail support you can do the following in your code::\n\n # favour django-mailer-2 but fall back to django.core.mail\n from django.conf import settings\n\n if \"django_mailer\" in settings.INSTALLED_APPS:\n from django_mailer import send_mail\n else:\n from django.core.mail import send_mail\n\nand then just call send_mail like you normally would in Django::\n\n send_mail(subject, message_body, settings.DEFAULT_FROM_EMAIL, recipients)\n\nAdditionally you can send all the admins as specified in the ``ADMIN``\nsetting by calling::\n\n mail_admins(subject, message_body)\n\nor all managers as defined in the ``MANAGERS`` setting by calling::\n\n mail_managers(subject, message_body)\n\n\nCommand Extensions\n===================================\n\nWith mailer in your INSTALLED_APPS, there will be four new manage.py commands\nyou can run:\n\n * ``send_mail`` will clear the current message queue. If there are any\n failures, they will be marked deferred and will not be attempted again by\n ``send_mail``.\n\n * ``retry_deferred`` will move any deferred mail back into the normal queue\n (so it will be attempted again on the next ``send_mail``).\n\n * ``cleanup_mail`` will delete mails created before an X number of days\n (defaults to 90).\n\n * ``status_mail`` the intent of this commant is to allow systems as nagios to\n be able to ask the queue about its status. It returns as string with than\n can be parses as ``(?P\\d+)/(?P\\d+)/(?P\\d+)``\n\nYou may want to set these up via cron to run regularly::\n\n * * * * * (cd $PROJECT; python manage.py send_mail >> $PROJECT/cron_mail.log 2>&1)\n 0,20,40 * * * * (cd $PROJECT; python manage.py retry_deferred >> $PROJECT/cron_mail_deferred.log 2>&1)\n 0 1 * * * (cd $PROJECT; python manage.py cleanup_mail --days=30 >> $PROJECT/cron_mail_cleanup.log 2>&1)\n\nThis attempts to send mail every minute with a retry on failure every 20 minutes \nand will run a cleanup task every day cleaning all the messaged created before\n30 days.\n\n``manage.py send_mail`` uses a lock file in case clearing the queue takes\nlonger than the interval between calling ``manage.py send_mail``.\n\nNote that if your project lives inside a virtualenv, you also have to execute\nthis command from the virtualenv. The same, naturally, applies also if you're\nexecuting it with cron.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/maykinmedia/django-mailer-2", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-mailer-2", "package_url": "https://pypi.org/project/django-mailer-2/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-mailer-2/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/maykinmedia/django-mailer-2" }, "release_url": "https://pypi.org/project/django-mailer-2/1.3.3/", "requires_dist": null, "requires_python": null, "summary": "A reusable Django app for queueing the sending of email (forked of APSL/django-mailer-2, which is unmaintained)", "version": "1.3.3" }, "last_serial": 1872017, "releases": { "1.3.2": [], "1.3.3": [ { "comment_text": "", "digests": { "md5": "782310f7519fd92be05e05848af5e882", "sha256": "c8bd9298759b81736310cddcac65afb8a424da57342fd522182e200403ad7713" }, "downloads": -1, "filename": "django-mailer-2-1.3.3.tar.gz", "has_sig": false, "md5_digest": "782310f7519fd92be05e05848af5e882", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23743, "upload_time": "2015-12-21T11:57:14", "url": "https://files.pythonhosted.org/packages/61/ae/77227f270d99645448427eff544a7acd6fa2e9ac6f2fb2017fffecedb739/django-mailer-2-1.3.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "782310f7519fd92be05e05848af5e882", "sha256": "c8bd9298759b81736310cddcac65afb8a424da57342fd522182e200403ad7713" }, "downloads": -1, "filename": "django-mailer-2-1.3.3.tar.gz", "has_sig": false, "md5_digest": "782310f7519fd92be05e05848af5e882", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23743, "upload_time": "2015-12-21T11:57:14", "url": "https://files.pythonhosted.org/packages/61/ae/77227f270d99645448427eff544a7acd6fa2e9ac6f2fb2017fffecedb739/django-mailer-2-1.3.3.tar.gz" } ] }