python-postmark

Postmark library for Python 2.4 and greater
Download

python-postmark Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Other/Proprietary Li...
  • Publisher Name:
  • Dave Martorana and Richard Cooper

python-postmark Tags


python-postmark Description

Postmark library for Python 2.4 and greater The python-postmark package provides PMMail and PMBounceManager objects for Postmark.Works on Python 2.4 and better. Versions 2.4 and 2.5 will require the "simplejson" library from http://code.google.com/p/simplejson/ Python 2.6 has JSON support built in.USAGE: Make sure you have a Postmark account. Visit http://postmarkapp.com to sign up for an account. Requires a Postmark API key. Import postmark.PMMail to use Postmark. Check class documentation on PMMail object for more information.DJANGO: The library can be used stand-alone with Django. You can also add the settings: POSTMARK_API_KEY = 'your-key' POSTMARK_SENDER = 'sender@signature.com' to your settings.py file, and when you create a new PMMail object, it will grab the API key and sender automatically. Make sure the sender email address is one of your Sender Signature email addresses in Postmark. You can also customize the name on the sender by changing the format from 'email@address.com' to 'Sender Name ' as long as the email part is part of a Sender Signature in Postmark To reoute all Django E-Mail functions like send_mail() and mail_admins() through postmark use the following setting: EMAIL_BACKEND = 'postmark.django_backend.EmailBackend' But keep in mind that even when using standard Django functions the sender must be registered with postmarkapp.com.EXCEPTIONS: PMMailMissingValueException(Exception): One of the required values for attempting a send request is missing PMMailSendException(Exception): Base Postmark send exception PMMailUnauthorizedException(PMMailSendException): 401: Unathorized sending due to bad API key PMMailUnprocessableEntityException(PMMailSendException): 422: Unprocessable Entity - usually an exception with either the sender not having a matching Sender Signature in Postmark. Read the message details for further information PMMailServerErrorException(PMMailSendException): 500: Internal error - this is on the Postmark server side. Errors are logged and recorded at Postmark. PMMailURLException(PMMailSendException): A URLError was caught - usually has to do with connectivity and the ability to reach the server. The inner_exception will have the base URLError object. Requirements: · Python


python-postmark Related Software