This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Help us improve Python packaging - Donate today!
Project Description

Dependencies

mailtoplone.base:

Scrawl:

Example buildout

buildout:

Change history

Changelog

0.2 (2009-05-10)

  • fix issue querying multidapter with None, now correctly use context.REQUEST [ramonski]

0.1 (2009-05-29)

  • call add_category [hplocher]
  • get all attachments from mail, and call add_file for each [hplocher] call add_file for each, before calling create
  • decode subject header, used as title [hplocher]
  • refactor adapter, use IBlogEntryFactory [hplocher]
  • add adapter to create a Blog Entry [hplocher] (title, body text, only atm)

Detailed Documentation

Introduction

We need manager role for this test:

>>> self.setRoles(('Manager',))

Configure Folder for Blog Entries

We use a standard Folder for dropping the emails in:

>>> self.portal.invokeFactory('Folder', 'blog_entries')
'blog_entries'
>>> blog_entries = self.portal.blog_entries

To enable MailDropbox functionality, we equip the folder with an additional marker interface:

>>> from zope.interface import alsoProvides
>>> from mailtoplone.scrawl.interfaces import IScrawlMailDropBoxMarker
>>> alsoProvides(blog_entries, IScrawlMailDropBoxMarker)

mailtoplone uses a more generic interface IMailDropBox, to adapt the context, we use that to call drop:

>>> from mailtoplone.base.interfaces import IMailDropBox
>>> IMailDropBox(blog_entries).drop("Subject: my first blog entry")

As result, we wexpect a single blog entry, with the title, id set according to the email’s subject:

>>> blog_entries.objectIds()
['my-first-blog-entry']
>>> blog_entry = blog_entries.listFolderContents()[0]
>>> blog_entry.title
u'my first blog entry'
>>> blog_entry.portal_type
'Blog Entry'

Contributors

Hans-Peter Locher, Author Ramon Bartl

Download

Release History

Release History

0.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
mailtoplone.scrawl-0.2.zip (23.8 kB) Copy SHA256 Checksum SHA256 Source Jun 10, 2009

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting