Skip to main content

Client for CloudMailin incoming email service

Project description

http://cloudmailin.com/

Requirements

  • django >= 1.2.0

Configuration

settings.py

Add to INSTALLED_APPS:

'cloudmailin'

Usage

MailHandler is a class based view. Since an application may have multiple email addresses, they have to be registered with their own secret key and callbacks. The callbacks can be reused if you want the same functionality for different email addresses.

from cloudmailin.views import MailHandler

mail_handler = MailHandler()
mail_handler.register_address(
    address='mysecretemail@cloudmailin.net',
    secret='mysupersecretkey',
    callback=my_callback_function
)

The callback will receive the HTTP post variables as keyword arguments:

def my_callback_function(**kwargs):
    # kwargs is a dict of cloudmailin post params
    pass

Then, in urls.py, register a URL pattern to act as the endpoint:

url(r'^receive/mail/here/$', mail_handler)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-cloudmailin-0.1.1.tar.gz (5.4 kB view details)

Uploaded Source

File details

Details for the file django-cloudmailin-0.1.1.tar.gz.

File metadata

File hashes

Hashes for django-cloudmailin-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9113a118821899ae3361a3a9b32f6085b22cefaaef0987cd43402846ee882e5f
MD5 e4268392834bf1825a86f41523a9b7f0
BLAKE2b-256 a77fc2f9b3320cc2abf44b1f27c3775d371f0447102f6f8118edb7de1afe88f7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page