Weblösungen mit Python und Plone

Analysieren, Konzipieren, Implementieren. Kontaktieren.

Gigantic Header Image

Feed your Plone Site with Mails

Grant your website an inbox

Use cases:

  • Create instant content from mobile and work on later on desktop
  • Display newsletters. Do it searchable.

The service rohberg.mailin listens to incoming mails of defined mail accounts and sends a request to Plone website. This request creates content in Plone.

Download code to arbitrary location and install with

yarn install

configure with config.env

and start with

yarn mailin

Configuration is made in config.env. See an example configuration at config.env.example

IMAP_USER = foo@gmail.com
IMAP_PASS = abc
IMAP_HOST = imap.gmail.com
IMAP_PORT = 993
WEBHOOK_TARGET = 'http://code.example.com'
PLONE_LOGIN = 'admin'
PLONE_PASSWORD = 'secret'
PLONE_CONTENTTYPE = 'mycontenttype'
ALLOWED_SENDERS = 'foo@gmail.com,bar@gmail.com'

Plone configuration

  1. plone.restapi is installed.
  2. User PLONE_LOGIN has write access to WEBHOOK_TARGET for PLONE_CONTENTTYPE.

Dependencies

mail-notifier https://www.npmjs.com/package/mail-notifier

No dependency on Plone. config.env defines the target. This target can be anything.

Credits

Thank you Harjyot Singh for inspiration.

Thank you jcreigno for mail-notifier.

Testing

Add your test email to ALLOWED_SENDERS and send an email from this account to IMAP_USER. This creates a first content item in Plone at WEBHOOK_TARGET.

More use cases

  • post reports as attachment (see TODOs)

Get it: rohberg.mailin

Neuen Kommentar hinzufügen

Sie können einen Kommentar abgeben, indem Sie das unten stehende Formular ausfüllen. Nur Text. Web- und E-Mail-Adressen werden in anklickbare Links umgewandelt. Kommentare werden moderiert.

Frage: 3 * 4 ?
Ergebnis: