Skip to content

rogerhub/postie

Repository files navigation

<h3>Installation</h3>
	<ul>
<li>Either:

<ul>
<li>Put the postie.zip file in wp-content/plugins/ and unzip it</li>
</ul></li>
<li>Or:

<ul>
<li>Use the automatic installer (WP 2.7+)</li>
</ul></li>
<li>Login to WordPress as an administrator</li>
<li>Goto the Plugins tab in the WordPress Admin Site</li>
<li>Activate "Postie"</li>
<li>Goto to the "Settings" tab and click on the sub-tab "Postie" to configure it.</li>
<li>Make sure you enter the mailserver information correctly, including the type
of connection and the port number. Common port configurations:

<ul>
<li>pop3: 110 </li>
<li>pop3-ssl: 995</li>
<li>imap: 143</li>
<li>imap-ssl: 993</li>
</ul></li>
<li>(Postie ignores the settings under Settings-&gt;Writing-&gt;Writing-by-Email)</li>
</ul>

<h4>Automating checking e-mail</h4>

<p>WordPress cron (which Postie relies on) doesn't run unless a page is accessed on 
the site. So if you send an email, but nobody accesses the site for 3 days Postie 
won't be given the chance to fetch the email and publish the post.</p>

<p>To ensure that Postie runs smoothly on a low or no volume site you need to ensure 
that a page gets hit (any page is fine). Use something like cron + curl on Linux 
or install curl on Windows and use the Scheduled Tasks control panel. If you are 
using a hosting company that doesn't allow you access to cron you can use a service 
like SetCronJob.</p>

<p>By default, postie checks for new e-mail every 30 minutes. You can select from
a number of different checking intervals in the settings page, under the
Mailserver tab.</p>

<h4>Forcing e-mail check</h4>

<p>If you would prefer to have more fine-grained control of how postie checks
for mail, you can also set up a crontab. This is for advanced users only.</p>

<p>Setup a cronjob to pull down the get&#095;mail.php - note that every time you access
get&#095;mail.php Postie will run - it is like clicking Run Postie on the Admin screen.</p>

<h4>Linux</h4>

<p>If your site runs on a UNIX/linux server, and you have shell access, you can
enable mail checking using cron.</p>

<p>Examples:</p>

<p>*/5 * * * * /usr/bin/lynx --source <a href="http://blog.robfelty.com/wp-content/plugins/postie/get&#095;mail.php" rel="nofollow">http://blog.robfelty.com/wp-content/plugins/postie/get&#095;mail.php</a> &gt;/dev/null 2&gt;&amp;1</p>

<p>This fetches the mail every five minutes with lynx</p>

<p>*/10 * * * * /usr/bin/wget -O /dev/null <a href="http://blog.robfelty.com/wp-content/plugins/postie/get&#095;mail.php" rel="nofollow">http://blog.robfelty.com/wp-content/plugins/postie/get&#095;mail.php</a> &gt;/dev/null 2&gt;&amp;1</p>

<p>This fetches the mail every ten minutes with wget</p>

<h4>Windows</h4>

<p>You will need to install <a href="http://gnuwin32.sourceforge.net/packages/wget.htm">wget</a> or <a href="http://curl.haxx.se/dlwiz/">curl</a>
Then use the Task Scheduler control panel to call wget or cron.</p>	<hr />
		
		<h3>Upgrade Notice</h3>
	<dl>
		<dt>1.5.3</dt>
		<dd>Postie can now set the first image in an email to be the &quot;Featured&quot; image. There is a new setting &quot;Use First Image as Featured Image&quot; which is off by default.
Postie now supports Use Transport Layer Security (TLS)</dd>
		<dt>1.5.0</dt>
		<dd>New filter postie_filter_email. Used to map &quot;from&quot; to any other email. Allows custom user mapping.</dd>
		<dt>1.4.41</dt>
		<dd>Post format is now supported. You can specify any of the WordPress supported post formats using the Post type syntax.
Post status can now be specified using the status: tag.
Post status setting was renamed to Default Post Status and moved to the Message tab.</dd>
		<dt>1.4.18</dt>
		<dd>Many method names have been changed. Any custom filters may need to be updated.</dd>
		<dt>1.4.10</dt>
		<dd>All script, style and body tags are stripped from html emails.</dd>
		<dt>1.4.6</dt>
		<dd>Attachments are now processed in the order they were attached.</dd>
	</dl>

	<h3 id='Usage'>Usage</h3>
<h4>Specifying Beginning and Ending of Post</h4>

<ul>
<li>If you put in :start - the message processing won't start until it sees that string.</li>
<li>If you put in :end - the message processing will stop once it sees that string.</li>
</ul>

<h4>Post Status</h4>

<ul>
<li>Posts can have their status set to draft, publish, pending or private. This will override the Default Post Status set in the settings screen.

<ul>
<li>status: private</li>
<li>status: draft</li>
</ul></li>
</ul>

<h4>Post Date</h4>

<ul>
<li>Posts can have a specific publication date such as Apr 14, 2013. Relative dates like "tomorrow", "monday", "first day of next month" are also supported.

<ul>
<li>date: date</li>
<li>date: date time</li>
</ul></li>
<li>Posts can be delayed by adding a line with delayXdXhXm where X is a number.

<ul>
<li>delay:1d - 1 day</li>
<li>delay:1h - 1 hour</li>
<li>delay:1m - 1 minute</li>
<li>delay:1d2h4m - 1 day 2 hours 4m</li>
</ul></li>
</ul>

<h4>Comment Control</h4>

<ul>
<li>By putting comments:X in your message you can control if comments are allowed

<ul>
<li>comments:0 - means closed</li>
<li>comments:1 - means open</li>
<li>comments:2 - means registered only</li>
</ul></li>
<li>Replying to an e-mail gets posted as a comment. 

<ul>
<li>For example, you e-mailed a post with the subject line "foo".
If you then send an e-mail with the subject line "Re: foo", it will
get posted as a comment to the "foo" post. This works by the subject
line, so if you have two posts with titles "foo", then the comment
will get placed in the more recent post.</li>
</ul></li>
</ul>

<h4>Post Excerpt</h4>

<ul>
<li>Custom excerpt

<ul>
<li>You can include a custom excerpt of an e-mail by putting it between
:excerptstart and :excerptend</li>
<li>You can include images in the excerpt by using the shortcode #eimg1#,
#eimg2# etc.</li>
</ul></li>
</ul>

<h4>Post type/format</h4>

<p>You can specify the post type or format by including it as the first part of the subject.
  E.g. aside//real subject</p>

<h4>Categories</h4>

<ul>
<li>If you put a category name in the subject with a : it will be used
as the category for the post</li>
<li>If you put a category id number in the subject with a : it will
be used as the category for the post</li>
<li><p>If you put the first part of a category name it will be posted in
the first category that the system finds that matches - so if you put</p>

<p>Gen: New News</p>

<p>The system will post that in General. Note you must turn on the "Match short category"
setting for this to work (on by default).</p></li>
<li><p>All of the above also applies if you put the category in brackets []</p></li>
<li><p>Using [] or you can post to multiple categories at once</p>

<p>Subject: [1] [Mo] [Br] My Subject</p>

<p>On my blog it would post to General (Id 1), Moblog, and Brewing all at one time</p></li>
<li><p>Using - or you can post to multiple categories at once</p>

<p>Subject: -1- -Mo- -Br- My Subject</p>

<p>On my blog it would post to General (Id 1), Moblog, and Brewing all at one time</p></li>
</ul>

<h4>Tags</h4>

<ul>
<li>You can add tags by adding a line in the body of the message like so:
tags: foo, bar</li>
<li>You can also set a default tag to be applied if no tags are included.</li>
</ul>

<h4>Image Handling</h4>

<p>Note you can only use this feature if your "Preferred Text Type" is set to "plain"</p>

<ul>
<li>Allows you to attach images to your email and automatically post
them to your blog</li>
<li>You can publish images in the text of your message by using #img1#
#img2# - each one will be replaced with the HTML for the image
you attached</li>
<li><p>Captions - you can also add a caption like so:</p>

<ul>
<li>#img1 caption='foo'#</li>
<li>#img2 caption='bar'#</li>
</ul>

<p>Or, if you use IPTC captions, this caption will be used  (adding a caption
in many photo editing programs (for example Picasa), will add an IPTC caption)</p>

<p>Note that the images are processed in the order they are attached as of version
1.4.6.</p></li>
<li><p>Image templates
Postie now uses the default wordpress image template, but you can specify a
different one if you wish.</p>

<p>You can also specify a custom image template. I use the following custom
template:</p>

<p><code>&lt;div class='imageframe alignleft'&gt;&lt;a href='{IMAGE}'&gt;&lt;img src="{THUMBNAIL}"
alt="{CAPTION}" title="{CAPTION}" 
class="attachment" /&gt;&lt;/a&gt;&lt;div
class='imagecaption'&gt;{CAPTION}&lt;/div&gt;&lt;/div&gt;</code></p>

<ul>
<li>{CAPTION} gets replaced with the caption you specified (if any)</li>
<li>{FILELINK} gets replaced with the url to the media</li>
<li>{FILENAME} gets replaced with the name of the attachment from the email</li>
<li>{FULL} same as {FILELINK}</li>
<li>{HEIGHT} gets replaced with the height of the photo</li>
<li>{ID} gets replaced with the post id</li>
<li>{IMAGE} same as {FILELINK}</li>
<li>{LARGEHEIGHT} gets replaced with the height of a large image</li>
<li>{LARGEWIDTH} gets replaced with the width of a large image</li>
<li>{LARGE} gets replaced with the url to the large-sized image</li>
<li>{MEDIUMHEIGHT} gets replaced with the height of a medium image</li>
<li>{MEDIUMWIDTH} gets replaced with the width of a medium image</li>
<li>{MEDIUM} gets replaced with the url to the medium-sized image</li>
<li>{PAGELINK} gets replaced with the URL of the file in WordPress</li>
<li>{POSTTITLE} gets replaced with the post title (subject)</li>
<li>{RELFILENAME} gets replaced with the relative path to the full-size image</li>
<li>{THUMBHEIGHT} gets replaced with the height of a thumbnail image</li>
<li>{THUMB} gets replaced with the url to the thumbnail image</li>
<li>{THUMBNAIL} same as {THUMB}</li>
<li>{THUMBWIDTH} gets replaced with the width of a thumbnail image</li>
<li>{TITLE} same as {POSTTITLE}</li>
<li>{URL} same as {FILELINK}</li>
<li>{WIDTH} gets replaced with width of the photo</li>
<li>{ICON} insert the icon for the attachment (for non-audio/image/video attachments only)</li>
</ul></li>
</ul>

<h4>Interoperability</h4>

<ul>
<li>If your mail client doesn't support setting the subject (nokia) you
can do so by putting #your subject/title here# at the beginning of your message</li>
<li>POP3,POP3-SSL,IMAP,IMAP-SSL now supported - last three require
php-imap support</li>
<li>The program understands enough about mime to not duplicate post
if you send an HTML and plain text message</li>
<li>Automatically confirms that you are installed correctly</li>
</ul>
<hr />

About

My fork of the Wordpress plugin, Postie, which is licensed under the GNU Public License.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages