0.6.2 • Published 8 years ago

email2postwp v0.6.2

Weekly downloads
1
License
ISC
Repository
github
Last release
8 years ago

email2postwp

This is a simple module that retrieves new emails from an IMAP server and creates posts in a WordPress site.

Prerequisite

A working IMAP email address and a WordPress with WP Rest API enabled with basic authentication.

Installation

As simple as installing any other global node package. Be sure to have npm and node installed and launch:

$ npm install -g email2postwp

Configuration

The email2postwp is configurable through environment variables. There are several variables available:

Environment variableDescription
EMAIL2POSTWP_HOSTimap mail host.
EMAIL2POSTWP_USERNAMEimap username.
EMAIL2POSTWP_PASSWORDimap password.
EMAIL2POSTWP_WPENDPOINTwordpress rest api endpoint.
EMAIL2POSTWP_WPUSERNAMEwordpress basic auth username.
EMAIL2POSTWP_WPPASSWORDwordpress basic auth password.
EMAIL2POSTWP_WPPOST_STATUSnew post status (default is draft).
EMAIL2POSTWP_WPPOST_CATEGORY_IDSnew post category ids (default is none).
EMAIL2POSTWP_WPALLOWED_EMAILSthe list of sender emails that post will be created (default is all).

Launching from source

If you downloaded the source code of the bot you can run it using NPM with:

$ npm start

Don't forget to configure the environment variables before doing so. Alternatively you can also create a file called imapsettings.js in the root folder and put your token there (you can use the imappsettings.js.example file as a reference) and a file called wpsettings.js in the root folder and put your token there (you can use the wpsettings.js.example file as a reference).