Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install mailtoplone.scrawl

How to install mailtoplone.scrawl

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install mailtoplone.scrawl
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.2 Available View build log
Windows (64-bit)
0.2 Available View build log
Mac OS X (10.5+)
0.2 Available View build log
Linux (32-bit)
0.2 Available View build log
Linux (64-bit)
0.2 Available View build log
 
License
GPL
Dependencies
Lastest release
version 0.2 on Jan 5th, 2011

Dependencies

mailtoplone.base:

Scrawl:

Example buildout

buildout:

Change history

Changelog
0.2 (2009-05-10)
  • fix issue querying multidapter with None,

System Message: WARNING/2 (<string>, line 27)

Bullet list ends without a blank line; unexpected unindent.

now correctly use context.REQUEST [ramonski]

0.1 (2009-05-29)
  • call add_category [hplocher]
  • get all attachments from mail, and call add_file

System Message: WARNING/2 (<string>, line 35)

Bullet list ends without a blank line; unexpected unindent.

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')

System Message: ERROR/3 (<string>, line 60)

Inconsistent literal block quoting.

'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()

System Message: ERROR/3 (<string>, line 80)

Inconsistent literal block quoting.

['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

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:2

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.