{ "info": { "author": "Pinax Team", "author_email": "developers@pinaxproject.com", "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", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3" ], "description": "=====\nUsage\n=====\n\nFirst, add \"mailer\" to your ``INSTALLED_APPS`` in your settings.py.\nRun ``./manage.py migrate`` to install models.\n\nUsing EMAIL_BACKEND\n===================\n\nThis is the preferred and easiest way to use django-mailer.\n\nTo automatically switch all your mail to use django-mailer, first set\nEMAIL_BACKEND::\n\n EMAIL_BACKEND = \"mailer.backend.DbBackend\"\n\nIf you were previously using a non-default EMAIL_BACKEND, you need to configure\nthe MAILER_EMAIL_BACKEND setting, so that django-mailer knows how to actually send\nthe mail::\n\n MAILER_EMAIL_BACKEND = \"your.actual.EmailBackend\"\n\nNow, just use the normal `Django mail functions\n`_ for sending email. These\nfunctions will store mail on a queue in the database, which must be sent as\nbelow.\n\nExplicitly putting mail on the queue\n====================================\n\nIf you don't want to send all email through django-mailer, you can send mail\nusing ``mailer.send_mail``, which has the same signature as Django's\n``send_mail`` function.\n\nYou can also do the following::\n\n # favour django-mailer but fall back to django.core.mail\n from django.conf import settings\n\n if \"mailer\" in settings.INSTALLED_APPS:\n from 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\nThere is also a convenience function ``mailer.send_html_mail`` for creating HTML\n(this function is **not** in Django)::\n\n send_html_mail(subject, message_plaintext, message_html, 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\nClear queue with command extensions\n===================================\n\nWith mailer in your INSTALLED_APPS, there will be three 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* ``purge_mail_log`` will remove old successful message logs from the database, to prevent it from filling up your database\n\n\nYou may want to set these up via cron to run regularly::\n\n\n * * * * * (/path/to/your/python /path/to/your/manage.py send_mail >> ~/cron_mail.log 2>&1)\n 0,20,40 * * * * (/path/to/your/python /path/to/your/manage.py retry_deferred >> ~/cron_mail_deferred.log 2>&1)\n 0 0 * * * (/path/to/your/python /path/to/your/manage.py purge_mail_log 7 >> ~/cron_mail_purge.log 2>&1)\n\nFor use in Pinax, for example, that might look like::\n\n * * * * * (cd $PINAX; /usr/local/bin/python2.5 manage.py send_mail >> $PINAX/cron_mail.log 2>&1)\n 0,20,40 * * * * (cd $PINAX; /usr/local/bin/python2.5 manage.py retry_deferred >> $PINAX/cron_mail_deferred.log 2>&1)\n 0 0 * * * (cd $PINAX; /usr/local/bin/python2.5 manage.py purge_mail_log 7 >> $PINAX/cron_mail_purge.log 2>&1)\n\nThis attempts to send mail every minute with a retry on failure every 20\nminutes, and purges the mail log for entries older than 7 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. The `Pinax documentation`_ explains that in more\ndetails.\n\n.. _pinax documentation: http://pinaxproject.com/docs/dev/deployment.html#sending-mail-and-notices\n\nControlling the delivery process\n================================\n\nIf you wish to have a finer control over the delivery process, which defaults\nto deliver everything in the queue, you can use the following 3 variables\n(default values shown)::\n\n MAILER_EMAIL_MAX_BATCH = None # integer or None\n MAILER_EMAIL_MAX_DEFERRED = None # integer or None\n MAILER_EMAIL_THROTTLE = 0 # passed to time.sleep()\n\nThese control how many emails are sent successfully before stopping the\ncurrent run `MAILER_EMAIL_MAX_BATCH`, after how many failed/deferred emails\nshould it stop `MAILER_EMAIL_MAX_DEFERRED` and how much time to wait between\neach email `MAILER_EMAIL_THROTTLE`.\n\nUnprocessed emails will be evaluated in the following delivery iterations.\n\nOther settings\n==============\n\nIf you need to be able to control where django-mailer puts its lock file (used\nto ensure mail is not sent twice), you can set ``MAILER_LOCK_PATH`` to a full\nabsolute path to the file to be used as a lock. The extension \".lock\" will be\nadded. The process running ``send_mail`` needs to have permissions to create and\ndelete this file, and others in the same directory. With the default value of\n``None`` django-mailer will use a path in current working directory.\nChange log\n==========\n\nUnreleased\n----------\n\n1.2.2\n-----\n\n* Django 1.10 support.\n* Fixed reprs for Message and MessageLog.\n\n1.2.1\n-----\n\n* More helpful admin for Message and MessageLog\n* Handle exceptions from really old Django versions\n\n1.2.0\n-----\n\n* Save the ``Message-ID`` header on ``Message`` explicitly to enable finding\n emails using this identifier.\n\n This includes a database schema migration.\n\n\n1.1.0\n-----\n\n* Deprecated calling ``send_mail`` and ``send_html_mail`` using ``priority``\n kwargs ``\"high\"``, ``\"medium\"``, and ``\"low\"``. Instead you should use\n ``PRIORITY_HIGH``, ``PRIORITY_MEDIUM`` and ``PRIORITY_LOW`` from\n ``mailer.models``.\n\n* Fixed bug with migrations for Django 1.7, which wanted to create a migration\n to 'fix' the EmailField length back down to 75 instead of 254.\n\n\n1.0.1\n-----\n\n* Included migrations - for both South and Django 1.7 native migrations.\n\n Note:\n\n * If you use South, you will need at least South 1.0\n * You will need to use '--fake' or '--fake-initial' on existing installations.\n\n These migrations were supposed to be in 1.0.0 but were omitted due to a\n packaging error.\n\n1.0.0\n-----\n\n* Throttling of email sending\n* Django 1.8 support\n* Admin tweaks and improvements\n* Various other fixes, especially from Renato Alves - thank you!\n\n0.1.0\n-----\n\n* First PyPI version\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/pinax/django-mailer/", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "django-mailer-ulamlabs", "package_url": "https://pypi.org/project/django-mailer-ulamlabs/", "platform": "", "project_url": "https://pypi.org/project/django-mailer-ulamlabs/", "project_urls": { "Homepage": "http://github.com/pinax/django-mailer/" }, "release_url": "https://pypi.org/project/django-mailer-ulamlabs/1.2.4/", "requires_dist": null, "requires_python": "", "summary": "A reusable Django app for queuing the sending of email", "version": "1.2.4" }, "last_serial": 3583436, "releases": { "1.2.3": [ { "comment_text": "", "digests": { "md5": "ec21b3fc8ba1b0e7066ff2fe27a2f6b9", "sha256": "883e16878b1d0dad43e06ec834155e6042700e27cfac7b4a2b24b75affc1c013" }, "downloads": -1, "filename": "django-mailer-ulamlabs-1.2.3.tar.gz", "has_sig": false, "md5_digest": "ec21b3fc8ba1b0e7066ff2fe27a2f6b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22831, "upload_time": "2017-08-28T06:34:46", "url": "https://files.pythonhosted.org/packages/13/17/1494561fbbc8245952f14c879e063ced0d10e0acb4ddf18d5c7c8027bc36/django-mailer-ulamlabs-1.2.3.tar.gz" } ], "1.2.4": [ { "comment_text": "", "digests": { "md5": "fc0d84dff2555cd3dbbf430620021462", "sha256": "ab47dcddcbd981608e1c546c0c9d3bd4d859e12277bf3910e61bf39a699484de" }, "downloads": -1, "filename": "django-mailer-ulamlabs-1.2.4.tar.gz", "has_sig": false, "md5_digest": "fc0d84dff2555cd3dbbf430620021462", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22856, "upload_time": "2018-02-15T06:20:20", "url": "https://files.pythonhosted.org/packages/49/55/77fa482ac7bdf1aa1b42d3d18d5ee3b9e7d26defc638c324f93889f97987/django-mailer-ulamlabs-1.2.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fc0d84dff2555cd3dbbf430620021462", "sha256": "ab47dcddcbd981608e1c546c0c9d3bd4d859e12277bf3910e61bf39a699484de" }, "downloads": -1, "filename": "django-mailer-ulamlabs-1.2.4.tar.gz", "has_sig": false, "md5_digest": "fc0d84dff2555cd3dbbf430620021462", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22856, "upload_time": "2018-02-15T06:20:20", "url": "https://files.pythonhosted.org/packages/49/55/77fa482ac7bdf1aa1b42d3d18d5ee3b9e7d26defc638c324f93889f97987/django-mailer-ulamlabs-1.2.4.tar.gz" } ] }