{ "info": { "author": "James Van Dyne", "author_email": "james@sugoisoft.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "=======\nPostgun\n=======\n\nSend email using Mailgun with Mailgun specific attributes.\n\nIt also includes an API-compatible send_mail function that allows you to pass\ncustom Mailgun-specific attributes when sending email including:\n\n* campaign\n* deliverytime\n* dkim\n* track\n* tracking clicks\n* tracking opens\n* tags\n\n\nQuick start\n-----------\n\n1. Install django_postgun\n\n.. code:: python\n\n pip install django_postgun\n\n\n2. Add \"postgun\" to INSTALLED_APPS:\n\n.. code:: python\n\n INSTALLED_APPS = (\n ...\n 'postgun'\n )\n\n3. Add the following settings to your settings.py:\n\n.. code:: python\n\n EMAIL_BACKEND = 'postgun.backends.MailgunEmailBackend'\n MAILGUN_DOMAIN = 'example.com'\n MAILGUN_API_KEY = 'key-my-api-key'\n MAILGUN_PUBLIC_KEY = 'pubkey-my-public-key' #Only needed for email validation\n\n\nSending Email\n-------------\n.. code:: python\n\n from postman import send_mail\n response_data = {}\n send_mail('Test Email', #subject\n 'This is your test message.', #text content\n 'admin@example.com', #from address\n ['james@example.com', ], #recipients\n html_message='This is your test message.', #html (optional) \n campaign='test', #Mailgun campaign id\n tags=['testing', 'august', 'beta'], #Mailgun tags - 3 max\n reply_to='jacob@example.com', #Reply to address\n response_data=response_data, #Variable to save response data from mailgun i.e. id and message\n )\n\n\nGetting Email Events\n--------------------\n\nPull in Mailgun Events for a given period of time and by filter. Accepts all of the regular Mailgun API arguments\nfor events and collects results spread across multiple pages into a single list for processing.\n\n* begin: datetime The time to start getting events.\n* end: datetime The time to grab events until.\n* ascending: True/False Ascending or descending (defult True)\n* limit: integer Limit to x number of items per page (default 300)\n* field: string Mailgun field filters (default no filter)\n\n.. code:: python\n\n import datetime\n from postman.events import get_events\n\n begin = datetime.datetime.now() - timedelta(days=1)\n\n items = get_events(begin=begin, limit=100)\n for event in items:\n #Process individual JSON events here\n\n\n\n\nValidating Email\n----------------\n\nValidate email checks against the Mailgun validation API to see if an\naddress is valid.\n\nIf an address is invalid and there are no suggestions a ValidationError is raised.\nIf an address is invalid and there *are* suggestions a ValidationError is raised with the suggestion in the message.\nReturns True on valid email or ConnectionError, AttributeErrors\n\n.. code:: python\n\n from postman.validators import validate_email_mailgun\n is_valid = validate_email_mailgun('james@hotmail.co.uk')", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/jamesvandyne/postgun", "keywords": null, "license": "BSD License", "maintainer": null, "maintainer_email": null, "name": "django-postgun", "package_url": "https://pypi.org/project/django-postgun/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-postgun/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://bitbucket.org/jamesvandyne/postgun" }, "release_url": "https://pypi.org/project/django-postgun/0.4/", "requires_dist": null, "requires_python": null, "summary": "Send email using Mailgun with Mailgun specific attributes.", "version": "0.4" }, "last_serial": 1820815, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "9386e9c401cb4e60ac91d3ea03438f49", "sha256": "b4ce6cd13180f7ec0f0d7364791bdccec20d84856f869eda276b3f74877c5b4a" }, "downloads": -1, "filename": "django-postgun-0.1.tar.gz", "has_sig": false, "md5_digest": "9386e9c401cb4e60ac91d3ea03438f49", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12907, "upload_time": "2015-08-13T20:42:28", "url": "https://files.pythonhosted.org/packages/6e/90/d10a2bb8ff261264faf79213bd175b7a932fce84786c293ac1e3b185564a/django-postgun-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "4e1065b26dc84cc1aa06260b065f383d", "sha256": "236c44f324fb86f175c24188ea4c59a753a9a973a062f60fffca3ea67ce76cd1" }, "downloads": -1, "filename": "django-postgun-0.2.tar.gz", "has_sig": false, "md5_digest": "4e1065b26dc84cc1aa06260b065f383d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7237, "upload_time": "2015-11-11T20:24:59", "url": "https://files.pythonhosted.org/packages/9e/9f/b5f9671a85737fdc2e546fc2c4288f511f482ca44fe864bf0ff0a4767d1a/django-postgun-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "26240be2a2f64fd3284ef86f2af4592c", "sha256": "f2980b5caccd83d09fe4d7458c0d9a52da7865349bffe1887e77e3ad050744cb" }, "downloads": -1, "filename": "django-postgun-0.3.tar.gz", "has_sig": false, "md5_digest": "26240be2a2f64fd3284ef86f2af4592c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10962, "upload_time": "2015-11-13T17:07:15", "url": "https://files.pythonhosted.org/packages/41/6f/13a53b78a9797fdd9e3f14195d22c8e3953ae70e1381894589d585059b7e/django-postgun-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "c8982da697d3b778de4bea25a5d5cb92", "sha256": "eb82a1920bae68dff553e06b8b8eb86e059059439e80c06d24b6c82f6cc06ffe" }, "downloads": -1, "filename": "django-postgun-0.4.tar.gz", "has_sig": false, "md5_digest": "c8982da697d3b778de4bea25a5d5cb92", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11054, "upload_time": "2015-11-17T16:53:09", "url": "https://files.pythonhosted.org/packages/fe/0f/48ba3fa5ceca1537aa9b2ba2f0a5c34131a1c787e62558af829814e6ca92/django-postgun-0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c8982da697d3b778de4bea25a5d5cb92", "sha256": "eb82a1920bae68dff553e06b8b8eb86e059059439e80c06d24b6c82f6cc06ffe" }, "downloads": -1, "filename": "django-postgun-0.4.tar.gz", "has_sig": false, "md5_digest": "c8982da697d3b778de4bea25a5d5cb92", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11054, "upload_time": "2015-11-17T16:53:09", "url": "https://files.pythonhosted.org/packages/fe/0f/48ba3fa5ceca1537aa9b2ba2f0a5c34131a1c787e62558af829814e6ca92/django-postgun-0.4.tar.gz" } ] }