Version Description
(2014.09.22) = * Moved FAQ and Help to PostiePlugin.com * Fixed file type issue with wp_handle_upload_prefilter() * Fixed cron issue
Download this release
Release Info
Developer | WayneAllen |
Plugin | Postie |
Version | 1.6.2 |
Comparing to | |
See all releases |
Code changes from version 1.6.1 to 1.6.2
- Revision +0 -2
- config_form.php +2 -5
- deploy/deploy.cmd +0 -8
- deploy/stripParts.pl +0 -22
- docs/Changes.txt +5 -0
- docs/FAQ.txt +1 -200
- docs/Installation.txt +0 -45
- docs/Postie.txt +4 -3
- docs/TODO.txt +4 -1
- faq.html +0 -243
- images/Thumbs.db +0 -0
- images/valid-xhtml10-blue.png +0 -0
- images/vcss-blue.gif +0 -0
- postie-functions.php +10 -5
- postie.php +8 -34
- readme.html +0 -7
- readme.txt +11 -248
Revision
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
Revision: 993341
|
2 |
-
Last Changed Date: 2014-09-18 22:14:45 -0700 (Thu, 18 Sep 2014)
|
|
|
|
config_form.php
CHANGED
@@ -122,7 +122,6 @@
|
|
122 |
<li id="simpleTabs-nav-5"><?php _e('Video and Audio', 'postie') ?></li>
|
123 |
<li id="simpleTabs-nav-6"><?php _e('Attachments', 'postie') ?></li>
|
124 |
<li id="simpleTabs-nav-7"><?php _e('Help', 'postie') ?></li>
|
125 |
-
<li id="simpleTabs-nav-8"><?php _e('FAQ', 'postie') ?></li>
|
126 |
</ul>
|
127 |
</div>
|
128 |
<div id="simpleTabs-content-1" class="simpleTabs-content">
|
@@ -830,12 +829,10 @@
|
|
830 |
</table>
|
831 |
</div>
|
832 |
<div id="simpleTabs-content-7" class="simpleTabs-content">
|
833 |
-
|
834 |
-
</div>
|
835 |
-
<div id="simpleTabs-content-8" class="simpleTabs-content">
|
836 |
-
<?php include(POSTIE_ROOT . '/faq.html'); ?>
|
837 |
</div>
|
838 |
|
|
|
839 |
<p class="submit">
|
840 |
<input type="hidden" name="action" value="update" />
|
841 |
<input type="hidden" name="page_options" value="postie-settings" />
|
122 |
<li id="simpleTabs-nav-5"><?php _e('Video and Audio', 'postie') ?></li>
|
123 |
<li id="simpleTabs-nav-6"><?php _e('Attachments', 'postie') ?></li>
|
124 |
<li id="simpleTabs-nav-7"><?php _e('Help', 'postie') ?></li>
|
|
|
125 |
</ul>
|
126 |
</div>
|
127 |
<div id="simpleTabs-content-1" class="simpleTabs-content">
|
829 |
</table>
|
830 |
</div>
|
831 |
<div id="simpleTabs-content-7" class="simpleTabs-content">
|
832 |
+
Visit <a href="http://postieplugin.com/" target="_blank">PostiePlugin.com</a> for lots of information and assistance.
|
|
|
|
|
|
|
833 |
</div>
|
834 |
|
835 |
+
|
836 |
<p class="submit">
|
837 |
<input type="hidden" name="action" value="update" />
|
838 |
<input type="hidden" name="page_options" value="postie-settings" />
|
deploy/deploy.cmd
CHANGED
@@ -1,12 +1,4 @@
|
|
1 |
cd ..
|
2 |
-
|
3 |
-
@echo Update revision
|
4 |
-
svn info | findstr "Date Revision" > Revision
|
5 |
-
|
6 |
@echo Create readme.txt
|
7 |
copy /Y docs\Postie.txt+docs\Installation.txt+docs\Usage.txt+docs\FAQ.txt+docs\Changes.txt readme.txt
|
8 |
-
|
9 |
-
@echo Create readme.html & faq.html
|
10 |
-
curl -F "text=1" -F "readme_contents=<readme.txt" http://wordpress.org/plugins/about/validator/ | perl deploy\stripParts.pl > readme.html
|
11 |
-
|
12 |
cd deploy
|
1 |
cd ..
|
|
|
|
|
|
|
|
|
2 |
@echo Create readme.txt
|
3 |
copy /Y docs\Postie.txt+docs\Installation.txt+docs\Usage.txt+docs\FAQ.txt+docs\Changes.txt readme.txt
|
|
|
|
|
|
|
|
|
4 |
cd deploy
|
deploy/stripParts.pl
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
#!/usr/bin/perl -w
|
2 |
-
use strict;
|
3 |
-
my $string = do {local ( $/ ); <> };
|
4 |
-
$string=~s/.*(<h3>Installation)/$1/s;
|
5 |
-
$string=~s/(.*)<h3>Changelog.*(<h3>.*)/$1$2/s;
|
6 |
-
$string=~s/(.*)<h3>Screenshots.*(<h3>.*)/$1$2/s;
|
7 |
-
if ($string=~s/(<h3>Frequently Asked Questions<\/h3>.*?)<hr \/>//s) {
|
8 |
-
my $faq=$1;
|
9 |
-
my $questions;
|
10 |
-
my $faqID=0;
|
11 |
-
while ($faq=~s/<h4>(.*)<\/h4>/<h4 id='answer-$faqID'>$1<\/h4>/) {
|
12 |
-
$questions.="<li id='question-$faqID'><a href='#answer-$faqID'>$1</a></li>\n";
|
13 |
-
$faqID++;
|
14 |
-
}
|
15 |
-
$faq=$questions.$faq;
|
16 |
-
my $faqFile='faq.html';
|
17 |
-
open(FAQ,">$faqFile");
|
18 |
-
print FAQ $faq;
|
19 |
-
close(FAQ);
|
20 |
-
}
|
21 |
-
$string=~s/<h2 id=\'re-edit'.*//s;
|
22 |
-
print $string;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
docs/Changes.txt
CHANGED
@@ -27,6 +27,11 @@ All script, style and body tags are stripped from html emails.
|
|
27 |
Attachments are now processed in the order they were attached.
|
28 |
|
29 |
== CHANGELOG ==
|
|
|
|
|
|
|
|
|
|
|
30 |
= 1.6.1 (2014.09.19) =
|
31 |
* Allow negative time corrections
|
32 |
* Fix links to settings page
|
27 |
Attachments are now processed in the order they were attached.
|
28 |
|
29 |
== CHANGELOG ==
|
30 |
+
= 1.6.2 (2014.09.22) =
|
31 |
+
* Moved FAQ and Help to PostiePlugin.com
|
32 |
+
* Fixed file type issue with wp_handle_upload_prefilter()
|
33 |
+
* Fixed cron issue
|
34 |
+
|
35 |
= 1.6.1 (2014.09.19) =
|
36 |
* Allow negative time corrections
|
37 |
* Fix links to settings page
|
docs/FAQ.txt
CHANGED
@@ -1,202 +1,3 @@
|
|
1 |
== Frequently Asked Questions ==
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
Make sure the port you are using is open. For example, bluehost seems to block
|
6 |
-
ports 993 and 995 (for pop3-ssl and imap-ssl) by default. I have heard that
|
7 |
-
you can request that they open them for you ( you might have to pay extra).
|
8 |
-
|
9 |
-
You can check for open ports with the following command on your server:
|
10 |
-
`netstat -ln|grep -E ':::(993|995|143)'`
|
11 |
-
|
12 |
-
If nothing shows up, then the ports are not open.
|
13 |
-
|
14 |
-
= How can I get postie to display inline images? =
|
15 |
-
|
16 |
-
Make sure that you send e-mail formatted as html (richtext), and set postie to
|
17 |
-
prefer html messages (in the message tab of the postie settings)
|
18 |
-
|
19 |
-
= Mail is not showing up right when I send html (rich formatted) e-mail! =
|
20 |
-
|
21 |
-
Make sure you set the preferred text type to html
|
22 |
-
|
23 |
-
= Do I need to any code to my theme for postie to work? =
|
24 |
-
|
25 |
-
No.
|
26 |
-
|
27 |
-
= I read somewhere to add an iframe to my footer. Should I do this? =
|
28 |
-
|
29 |
-
No. Do not add an iframe in your footer to get postie to check mail
|
30 |
-
periodically. To check e-mail periodically, either set-up a cron job, or use
|
31 |
-
cronless postie. See installation instructions
|
32 |
-
|
33 |
-
= My mail host requires SSL, but postie will not allow me to select pop3-ssl or imap-ssl =
|
34 |
-
|
35 |
-
You must have php-imap installed on your server for this to work. Ask your
|
36 |
-
hosting provider about this.
|
37 |
-
|
38 |
-
= Can I use postie to check a gmail account? =
|
39 |
-
|
40 |
-
Yes. You can use either pop3-ssl or imap-ssl with a gmail account (including Google Apps). Before
|
41 |
-
attempting to use with postie, make sure that you enable pop or imap in your
|
42 |
-
gmail preferences.
|
43 |
-
|
44 |
-
* Pop3 settings:
|
45 |
-
* protocol - pop3-ssl
|
46 |
-
* Use Transport Layer Security - no
|
47 |
-
* server - pop.gmail.com
|
48 |
-
* port - 995
|
49 |
-
* userid - your full email address
|
50 |
-
* password - your password
|
51 |
-
* IMAP settings:
|
52 |
-
* protocol - imap-ssl
|
53 |
-
* Use Transport Layer Security - no
|
54 |
-
* server - imap.gmail.com
|
55 |
-
* port - 993
|
56 |
-
* userid - your full email address
|
57 |
-
* password - your password
|
58 |
-
|
59 |
-
= Can I use postie with GoDaddy hosting? =
|
60 |
-
|
61 |
-
Yes, but you must use an email set up using the GoDaddy email service and the following settings:
|
62 |
-
|
63 |
-
* protocol - pop3
|
64 |
-
* Use Transport Layer Security - no
|
65 |
-
* server - pop.secureserver.net
|
66 |
-
* port - 110
|
67 |
-
* userid - xxxxx@yourdomain
|
68 |
-
* password - your password
|
69 |
-
|
70 |
-
GoDaddy hosting does not allow you to connect to non-GoDaddy mail servers like Gmail.
|
71 |
-
|
72 |
-
= My posts show up as being posted by 'admin' instead of me. Why? =
|
73 |
-
|
74 |
-
If your admin account is linked to bar@gmail.com, and you send mail from
|
75 |
-
bar@gmail.com, it will show up as being posted by admin. If you have a
|
76 |
-
wordpress user named "John Doe", which is linked to johndoe@gmail.com, make
|
77 |
-
sure that you send e-mails from johndoe@gmail.com. It doesn't matter which
|
78 |
-
e-mail address postie is checking. That is, if you send mail from
|
79 |
-
johndoe@gmail.com to foo@gmail.com, it gets posted as "John Doe".
|
80 |
-
|
81 |
-
If you send an e-mail to your postie address from an e-mail address that is no
|
82 |
-
t linked to a wordpress user, it will get posted as admin.
|
83 |
-
|
84 |
-
= Images aren't showing up at all? =
|
85 |
-
|
86 |
-
There are a couple possible reasons for this. First, check to see if you can
|
87 |
-
add an image through wordpress's normal posting mechanism. If not, then there
|
88 |
-
is probably 1 or 2 problems:
|
89 |
-
1. Your server does not have the php-gd library installed. Ask your hosting
|
90 |
-
provider about this.
|
91 |
-
|
92 |
-
2. Your wp-content/uploads directory is not writable by the webserver. Make
|
93 |
-
sure that it is
|
94 |
-
|
95 |
-
= Can I delete the wp-files directory needed by postie version <1.3.0? =
|
96 |
-
|
97 |
-
If you have posts published already by older versions of postie, getting rid
|
98 |
-
of those directories will delete any files you might have had associated with
|
99 |
-
those old posts. If you don't have any such posts, then you can safely delete
|
100 |
-
them.
|
101 |
-
|
102 |
-
= How can I get rid of stupid stuff my e-mail provider adds to my messages? =
|
103 |
-
|
104 |
-
To strip off stuff that they add at the beginning of a message, start your
|
105 |
-
post with :start
|
106 |
-
|
107 |
-
To strip off stuff that they add at the end of a message, end your
|
108 |
-
post with :end
|
109 |
-
|
110 |
-
= How can I add custom attachment icons? =
|
111 |
-
|
112 |
-
Simply upload the icons you want to the postie/icons/custom directory. You
|
113 |
-
must name the icons according to the following scheme:
|
114 |
-
`{filetype}-{size}.png`
|
115 |
-
|
116 |
-
NOTE THAT ANY CUSTOM FILES ADDED TO THE POSTIE DIRECTORY WILL BE DELETED IF YOU
|
117 |
-
USE THE NORMAL WORDPRESS UPGRADE PROCESS.
|
118 |
-
|
119 |
-
For example, for word documents, you could use:
|
120 |
-
|
121 |
-
`doc-32.png`
|
122 |
-
|
123 |
-
for a 32x32 pixel icon. (You can actually create any size icon you want, but
|
124 |
-
if you name it 32, then it will only be used if you select to use size 32
|
125 |
-
icons)
|
126 |
-
|
127 |
-
See the other directories in icons for more examples.
|
128 |
-
|
129 |
-
Currently the following filetypes are supported:
|
130 |
-
|
131 |
-
* doc - microsoft word (including docx)
|
132 |
-
* ppt - microsoft powerpoint (including pptx)
|
133 |
-
* xls - microsoft excel (including xlsx)
|
134 |
-
* numbers - iWork numbres spreadsheet
|
135 |
-
* pages - iWork pages document
|
136 |
-
* key - iWork keynote presentation
|
137 |
-
* pdf - portable document format
|
138 |
-
* rtf - rich text format
|
139 |
-
* txt - plain text document
|
140 |
-
|
141 |
-
= Can I add special text to the body of the post when using postie? =
|
142 |
-
|
143 |
-
Yes. You can create your own function, and use the postie_post filter.
|
144 |
-
Two short examples are included in the filterPostie.php.sample file
|
145 |
-
|
146 |
-
= Can I add special text to the title of the post when using postie? =
|
147 |
-
|
148 |
-
Yes. You can create your own function, and use the postie_post filter.
|
149 |
-
Two short examples are included in the filterPostie.php.sample file
|
150 |
-
|
151 |
-
= Can I select tags or categories based on the content of the e-mail? =
|
152 |
-
|
153 |
-
Yes. You can create your own function, and use the postie_post filter.
|
154 |
-
See the filterPostie.php.sample file for examples.
|
155 |
-
|
156 |
-
= Is the IMAP extension required for postie? =
|
157 |
-
|
158 |
-
The IMAP extension is not required, but it is strongly recommended, especially
|
159 |
-
is you are using non-English text. There is more information on php.net about
|
160 |
-
installing the IMAP extension. If you have control over your server, it is
|
161 |
-
often not hard to install.
|
162 |
-
|
163 |
-
On Ubuntu, try
|
164 |
-
`sudo apt-get install php5-imap`
|
165 |
-
|
166 |
-
On Fedora, try
|
167 |
-
`sudo yuminstall php-imap`
|
168 |
-
|
169 |
-
The IMAP extension is known to be installed on the following popular webhosts:
|
170 |
-
* Dreamhost
|
171 |
-
|
172 |
-
= How can I embed youtube or vimeo videos? =
|
173 |
-
|
174 |
-
Simply put the url in the body of your e-mail. (Make sure that you have the
|
175 |
-
option to convert url into links turned on)
|
176 |
-
|
177 |
-
= Something is going wrong, how do I see what is happening? =
|
178 |
-
|
179 |
-
Add the following lines to your wp-config.php file
|
180 |
-
`define('WP_DEBUG', true);
|
181 |
-
define('WP_DEBUG_LOG', true);
|
182 |
-
define('POSTIE_DEBUG', true);`
|
183 |
-
|
184 |
-
Various errors, warning and informational will be written to the wp-content\debug.log
|
185 |
-
file. There may also be all sorts of warnings and messages in your site as well
|
186 |
-
depending on how well behaved your other plugins and themes are, so you will not
|
187 |
-
want to leave these settings set to true all the time.
|
188 |
-
|
189 |
-
= Why doesn't Postie automatically publish my emails when running manually works =
|
190 |
-
|
191 |
-
WordPress cron (which Postie relies on) doesn't run unless a page is accessed on the
|
192 |
-
site. So if you send an email, but nobody accesses the site for 3 days Postie won't
|
193 |
-
be given the chance to fetch the email and publish the post.
|
194 |
-
|
195 |
-
To ensure that Postie runs smoothly on a low or no volume site you need to ensure that
|
196 |
-
a page gets hit (any page is fine). Use something like cron + curl on Linux or install
|
197 |
-
curl on Windows and use the Scheduled Tasks control panel. If you are using a hosting company
|
198 |
-
that doesn't allow you access to cron you can use a service like
|
199 |
-
<a href="https://www.setcronjob.com/" target="_blank">SetCronJob</a>.
|
200 |
-
|
201 |
-
It is also possible to turn the WordPress cron off. Please make sure something like
|
202 |
-
`define('DISABLE_WP_CRON', true);` is not in your wp-config.php file.
|
1 |
== Frequently Asked Questions ==
|
2 |
|
3 |
+
Please visit our FAQ page at <a href="http://postieplugin.com/faq/">http://postieplugin.com/faq/</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
docs/Installation.txt
CHANGED
@@ -9,49 +9,4 @@
|
|
9 |
* Goto to the "Settings" tab and click on the sub-tab "Postie" to configure it.
|
10 |
* Make sure you enter the mailserver information correctly, including the type
|
11 |
of connection and the port number. Common port configurations:
|
12 |
-
* pop3: 110
|
13 |
-
* pop3-ssl: 995
|
14 |
-
* imap: 143
|
15 |
-
* imap-ssl: 993
|
16 |
* (Postie ignores the settings under Settings->Writing->Writing-by-Email)
|
17 |
-
|
18 |
-
= Automating checking e-mail =
|
19 |
-
WordPress cron (which Postie relies on) doesn't run unless a page is accessed on
|
20 |
-
the site. So if you send an email, but nobody accesses the site for 3 days Postie
|
21 |
-
won't be given the chance to fetch the email and publish the post.
|
22 |
-
|
23 |
-
To ensure that Postie runs smoothly on a low or no volume site you need to ensure
|
24 |
-
that a page gets hit (any page is fine). Use something like cron + curl on Linux
|
25 |
-
or install curl on Windows and use the Scheduled Tasks control panel. If you are
|
26 |
-
using a hosting company that doesn't allow you access to cron you can use a service
|
27 |
-
like SetCronJob.
|
28 |
-
|
29 |
-
By default, postie checks for new e-mail every 30 minutes. You can select from
|
30 |
-
a number of different checking intervals in the settings page, under the
|
31 |
-
Mailserver tab.
|
32 |
-
|
33 |
-
= Forcing e-mail check =
|
34 |
-
If you would prefer to have more fine-grained control of how postie checks
|
35 |
-
for mail, you can also set up a crontab. This is for advanced users only.
|
36 |
-
|
37 |
-
Setup a cronjob to pull down the get\_mail.php - note that every time you access
|
38 |
-
get\_mail.php Postie will run - it is like clicking Run Postie on the Admin screen.
|
39 |
-
|
40 |
-
= Linux =
|
41 |
-
If your site runs on a UNIX/linux server, and you have shell access, you can
|
42 |
-
enable mail checking using cron.
|
43 |
-
|
44 |
-
Examples:
|
45 |
-
|
46 |
-
*/5 * * * * /usr/bin/lynx --source http://blog.robfelty.com/wp-content/plugins/postie/get\_mail.php >/dev/null 2>&1
|
47 |
-
|
48 |
-
This fetches the mail every five minutes with lynx
|
49 |
-
|
50 |
-
*/10 * * * * /usr/bin/wget -O /dev/null http://blog.robfelty.com/wp-content/plugins/postie/get\_mail.php >/dev/null 2>&1
|
51 |
-
|
52 |
-
This fetches the mail every ten minutes with wget
|
53 |
-
|
54 |
-
= Windows =
|
55 |
-
You will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or [curl](http://curl.haxx.se/dlwiz/)
|
56 |
-
Then use the Task Scheduler control panel to call wget or cron.
|
57 |
-
|
9 |
* Goto to the "Settings" tab and click on the sub-tab "Postie" to configure it.
|
10 |
* Make sure you enter the mailserver information correctly, including the type
|
11 |
of connection and the port number. Common port configurations:
|
|
|
|
|
|
|
|
|
12 |
* (Postie ignores the settings under Settings->Writing->Writing-by-Email)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
docs/Postie.txt
CHANGED
@@ -6,14 +6,14 @@ Plugin URI: http://PostiePlugin.com/
|
|
6 |
Tags: e-mail, email, post-by-email
|
7 |
Requires at least: 3.0
|
8 |
Tested up to: 4.0
|
9 |
-
Stable tag: 1.6.
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
13 |
Postie allows you to create posts via email, including many advanced features not found in WordPress's default Post by Email feature.
|
14 |
|
15 |
== Description ==
|
16 |
-
Postie offers many advanced features for creating posts
|
17 |
including the ability to assign categories by name, included pictures and
|
18 |
videos, and automatically strip off signatures. It also has support for both
|
19 |
IMAP and POP3, with the option for ssl with both. For usage notes, see the
|
@@ -53,4 +53,5 @@ More info at http://PostiePlugin.com/
|
|
53 |
5. Even more message options
|
54 |
6. Image options
|
55 |
7. Video and Audio options
|
56 |
-
8. Attachment options
|
|
6 |
Tags: e-mail, email, post-by-email
|
7 |
Requires at least: 3.0
|
8 |
Tested up to: 4.0
|
9 |
+
Stable tag: 1.6.2
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
13 |
Postie allows you to create posts via email, including many advanced features not found in WordPress's default Post by Email feature.
|
14 |
|
15 |
== Description ==
|
16 |
+
Postie offers many advanced features for creating posts by email,
|
17 |
including the ability to assign categories by name, included pictures and
|
18 |
videos, and automatically strip off signatures. It also has support for both
|
19 |
IMAP and POP3, with the option for ssl with both. For usage notes, see the
|
53 |
5. Even more message options
|
54 |
6. Image options
|
55 |
7. Video and Audio options
|
56 |
+
8. Attachment options
|
57 |
+
|
docs/TODO.txt
CHANGED
@@ -9,7 +9,10 @@ gallery logic does not handle both images and non-images
|
|
9 |
plugin conflict - Image Rotation Fixer/Image Rotation Repair
|
10 |
send email notice when attachments are rejected.
|
11 |
review http://wp.smashingmagazine.com/2011/11/23/improve-wordpress-plugins-readme-txt/
|
12 |
-
use wordpress plugin
|
|
|
|
|
|
|
13 |
configurable message for "post confirmation" - variable substitution
|
14 |
add hooks for post meta data change
|
15 |
post type
|
9 |
plugin conflict - Image Rotation Fixer/Image Rotation Repair
|
10 |
send email notice when attachments are rejected.
|
11 |
review http://wp.smashingmagazine.com/2011/11/23/improve-wordpress-plugins-readme-txt/
|
12 |
+
use wordpress plugin template
|
13 |
+
boilerplate http://wppb.io/
|
14 |
+
starter-plugin https://github.com/mattyza/starter-plugin
|
15 |
+
WordPress-Plugin-Template https://github.com/hlashbrooke/WordPress-Plugin-Template
|
16 |
configurable message for "post confirmation" - variable substitution
|
17 |
add hooks for post meta data change
|
18 |
post type
|
faq.html
DELETED
@@ -1,243 +0,0 @@
|
|
1 |
-
<li id='question-0'><a href='#answer-0'>Postie won't connect to my mailserver. Why Not?</a></li>
|
2 |
-
<li id='question-1'><a href='#answer-1'>How can I get postie to display inline images?</a></li>
|
3 |
-
<li id='question-2'><a href='#answer-2'>Mail is not showing up right when I send html (rich formatted) e-mail!</a></li>
|
4 |
-
<li id='question-3'><a href='#answer-3'>Do I need to any code to my theme for postie to work?</a></li>
|
5 |
-
<li id='question-4'><a href='#answer-4'>I read somewhere to add an iframe to my footer. Should I do this?</a></li>
|
6 |
-
<li id='question-5'><a href='#answer-5'>My mail host requires SSL, but postie will not allow me to select pop3-ssl or imap-ssl</a></li>
|
7 |
-
<li id='question-6'><a href='#answer-6'>Can I use postie to check a gmail account?</a></li>
|
8 |
-
<li id='question-7'><a href='#answer-7'>Can I use postie with GoDaddy hosting?</a></li>
|
9 |
-
<li id='question-8'><a href='#answer-8'>My posts show up as being posted by 'admin' instead of me. Why?</a></li>
|
10 |
-
<li id='question-9'><a href='#answer-9'>Images aren't showing up at all?</a></li>
|
11 |
-
<li id='question-10'><a href='#answer-10'>Can I delete the wp-files directory needed by postie version <1.3.0?</a></li>
|
12 |
-
<li id='question-11'><a href='#answer-11'>How can I get rid of stupid stuff my e-mail provider adds to my messages?</a></li>
|
13 |
-
<li id='question-12'><a href='#answer-12'>How can I add custom attachment icons?</a></li>
|
14 |
-
<li id='question-13'><a href='#answer-13'>Can I add special text to the body of the post when using postie?</a></li>
|
15 |
-
<li id='question-14'><a href='#answer-14'>Can I add special text to the title of the post when using postie?</a></li>
|
16 |
-
<li id='question-15'><a href='#answer-15'>Can I select tags or categories based on the content of the e-mail?</a></li>
|
17 |
-
<li id='question-16'><a href='#answer-16'>Is the IMAP extension required for postie?</a></li>
|
18 |
-
<li id='question-17'><a href='#answer-17'>How can I embed youtube or vimeo videos?</a></li>
|
19 |
-
<li id='question-18'><a href='#answer-18'>Something is going wrong, how do I see what is happening?</a></li>
|
20 |
-
<li id='question-19'><a href='#answer-19'>Why doesn't Postie automatically publish my emails when running manually works</a></li>
|
21 |
-
<h3>Frequently Asked Questions</h3>
|
22 |
-
<h4 id='answer-0'>Postie won't connect to my mailserver. Why Not?</h4>
|
23 |
-
|
24 |
-
<p>Make sure the port you are using is open. For example, bluehost seems to block
|
25 |
-
ports 993 and 995 (for pop3-ssl and imap-ssl) by default. I have heard that
|
26 |
-
you can request that they open them for you ( you might have to pay extra).</p>
|
27 |
-
|
28 |
-
<p>You can check for open ports with the following command on your server:</p>
|
29 |
-
|
30 |
-
<pre><code>netstat -ln|grep -E ':::(993|995|143)'</code></pre>
|
31 |
-
|
32 |
-
<p>If nothing shows up, then the ports are not open.</p>
|
33 |
-
|
34 |
-
<h4 id='answer-1'>How can I get postie to display inline images?</h4>
|
35 |
-
|
36 |
-
<p>Make sure that you send e-mail formatted as html (richtext), and set postie to
|
37 |
-
prefer html messages (in the message tab of the postie settings)</p>
|
38 |
-
|
39 |
-
<h4 id='answer-2'>Mail is not showing up right when I send html (rich formatted) e-mail!</h4>
|
40 |
-
|
41 |
-
<p>Make sure you set the preferred text type to html</p>
|
42 |
-
|
43 |
-
<h4 id='answer-3'>Do I need to any code to my theme for postie to work?</h4>
|
44 |
-
|
45 |
-
<p>No.</p>
|
46 |
-
|
47 |
-
<h4 id='answer-4'>I read somewhere to add an iframe to my footer. Should I do this?</h4>
|
48 |
-
|
49 |
-
<p>No. Do not add an iframe in your footer to get postie to check mail
|
50 |
-
periodically. To check e-mail periodically, either set-up a cron job, or use
|
51 |
-
cronless postie. See installation instructions</p>
|
52 |
-
|
53 |
-
<h4 id='answer-5'>My mail host requires SSL, but postie will not allow me to select pop3-ssl or imap-ssl</h4>
|
54 |
-
|
55 |
-
<p>You must have php-imap installed on your server for this to work. Ask your
|
56 |
-
hosting provider about this.</p>
|
57 |
-
|
58 |
-
<h4 id='answer-6'>Can I use postie to check a gmail account?</h4>
|
59 |
-
|
60 |
-
<p>Yes. You can use either pop3-ssl or imap-ssl with a gmail account (including Google Apps). Before
|
61 |
-
attempting to use with postie, make sure that you enable pop or imap in your
|
62 |
-
gmail preferences.</p>
|
63 |
-
|
64 |
-
<ul>
|
65 |
-
<li>Pop3 settings:
|
66 |
-
|
67 |
-
<ul>
|
68 |
-
<li>protocol - pop3-ssl</li>
|
69 |
-
<li>Use Transport Layer Security - no</li>
|
70 |
-
<li>server - pop.gmail.com</li>
|
71 |
-
<li>port - 995</li>
|
72 |
-
<li>userid - your full email address</li>
|
73 |
-
<li>password - your password </li>
|
74 |
-
</ul></li>
|
75 |
-
<li>IMAP settings:
|
76 |
-
|
77 |
-
<ul>
|
78 |
-
<li>protocol - imap-ssl</li>
|
79 |
-
<li>Use Transport Layer Security - no</li>
|
80 |
-
<li>server - imap.gmail.com</li>
|
81 |
-
<li>port - 993</li>
|
82 |
-
<li>userid - your full email address</li>
|
83 |
-
<li>password - your password </li>
|
84 |
-
</ul></li>
|
85 |
-
</ul>
|
86 |
-
|
87 |
-
<h4 id='answer-7'>Can I use postie with GoDaddy hosting?</h4>
|
88 |
-
|
89 |
-
<p>Yes, but you must use an email set up using the GoDaddy email service and the following settings:</p>
|
90 |
-
|
91 |
-
<ul>
|
92 |
-
<li>protocol - pop3</li>
|
93 |
-
<li>Use Transport Layer Security - no</li>
|
94 |
-
<li>server - pop.secureserver.net</li>
|
95 |
-
<li>port - 110</li>
|
96 |
-
<li>userid - xxxxx@yourdomain</li>
|
97 |
-
<li>password - your password </li>
|
98 |
-
</ul>
|
99 |
-
|
100 |
-
<p>GoDaddy hosting does not allow you to connect to non-GoDaddy mail servers like Gmail.</p>
|
101 |
-
|
102 |
-
<h4 id='answer-8'>My posts show up as being posted by 'admin' instead of me. Why?</h4>
|
103 |
-
|
104 |
-
<p>If your admin account is linked to <a href="mailto:bar@gmail.com">bar@gmail.com</a>, and you send mail from
|
105 |
-
<a href="mailto:bar@gmail.com">bar@gmail.com</a>, it will show up as being posted by admin. If you have a
|
106 |
-
wordpress user named "John Doe", which is linked to <a href="mailto:johndoe@gmail.com">johndoe@gmail.com</a>, make
|
107 |
-
sure that you send e-mails from <a href="mailto:johndoe@gmail.com">johndoe@gmail.com</a>. It doesn't matter which
|
108 |
-
e-mail address postie is checking. That is, if you send mail from
|
109 |
-
<a href="mailto:johndoe@gmail.com">johndoe@gmail.com</a> to <a href="mailto:foo@gmail.com">foo@gmail.com</a>, it gets posted as "John Doe".</p>
|
110 |
-
|
111 |
-
<p>If you send an e-mail to your postie address from an e-mail address that is no
|
112 |
-
t linked to a wordpress user, it will get posted as admin.</p>
|
113 |
-
|
114 |
-
<h4 id='answer-9'>Images aren't showing up at all?</h4>
|
115 |
-
|
116 |
-
<p>There are a couple possible reasons for this. First, check to see if you can
|
117 |
-
add an image through wordpress's normal posting mechanism. If not, then there
|
118 |
-
is probably 1 or 2 problems:
|
119 |
-
1. Your server does not have the php-gd library installed. Ask your hosting
|
120 |
-
provider about this.</p>
|
121 |
-
|
122 |
-
<ol>
|
123 |
-
<li>Your wp-content/uploads directory is not writable by the webserver. Make
|
124 |
-
sure that it is</li>
|
125 |
-
</ol>
|
126 |
-
|
127 |
-
<h4 id='answer-10'>Can I delete the wp-files directory needed by postie version <1.3.0?</h4>
|
128 |
-
|
129 |
-
<p>If you have posts published already by older versions of postie, getting rid
|
130 |
-
of those directories will delete any files you might have had associated with
|
131 |
-
those old posts. If you don't have any such posts, then you can safely delete
|
132 |
-
them.</p>
|
133 |
-
|
134 |
-
<h4 id='answer-11'>How can I get rid of stupid stuff my e-mail provider adds to my messages?</h4>
|
135 |
-
|
136 |
-
<p>To strip off stuff that they add at the beginning of a message, start your
|
137 |
-
post with :start</p>
|
138 |
-
|
139 |
-
<p>To strip off stuff that they add at the end of a message, end your
|
140 |
-
post with :end</p>
|
141 |
-
|
142 |
-
<h4 id='answer-12'>How can I add custom attachment icons?</h4>
|
143 |
-
|
144 |
-
<p>Simply upload the icons you want to the postie/icons/custom directory. You
|
145 |
-
must name the icons according to the following scheme:</p>
|
146 |
-
|
147 |
-
<pre><code>{filetype}-{size}.png</code></pre>
|
148 |
-
|
149 |
-
<p>NOTE THAT ANY CUSTOM FILES ADDED TO THE POSTIE DIRECTORY WILL BE DELETED IF YOU
|
150 |
-
USE THE NORMAL WORDPRESS UPGRADE PROCESS.</p>
|
151 |
-
|
152 |
-
<p>For example, for word documents, you could use:</p>
|
153 |
-
|
154 |
-
<pre><code>doc-32.png</code></pre>
|
155 |
-
|
156 |
-
<p>for a 32x32 pixel icon. (You can actually create any size icon you want, but
|
157 |
-
if you name it 32, then it will only be used if you select to use size 32
|
158 |
-
icons)</p>
|
159 |
-
|
160 |
-
<p>See the other directories in icons for more examples.</p>
|
161 |
-
|
162 |
-
<p>Currently the following filetypes are supported:</p>
|
163 |
-
|
164 |
-
<ul>
|
165 |
-
<li>doc - microsoft word (including docx)</li>
|
166 |
-
<li>ppt - microsoft powerpoint (including pptx)</li>
|
167 |
-
<li>xls - microsoft excel (including xlsx)</li>
|
168 |
-
<li>numbers - iWork numbres spreadsheet</li>
|
169 |
-
<li>pages - iWork pages document</li>
|
170 |
-
<li>key - iWork keynote presentation</li>
|
171 |
-
<li>pdf - portable document format</li>
|
172 |
-
<li>rtf - rich text format</li>
|
173 |
-
<li>txt - plain text document</li>
|
174 |
-
</ul>
|
175 |
-
|
176 |
-
<h4 id='answer-13'>Can I add special text to the body of the post when using postie?</h4>
|
177 |
-
|
178 |
-
<p>Yes. You can create your own function, and use the postie_post filter.
|
179 |
-
Two short examples are included in the filterPostie.php.sample file</p>
|
180 |
-
|
181 |
-
<h4 id='answer-14'>Can I add special text to the title of the post when using postie?</h4>
|
182 |
-
|
183 |
-
<p>Yes. You can create your own function, and use the postie_post filter.
|
184 |
-
Two short examples are included in the filterPostie.php.sample file</p>
|
185 |
-
|
186 |
-
<h4 id='answer-15'>Can I select tags or categories based on the content of the e-mail?</h4>
|
187 |
-
|
188 |
-
<p>Yes. You can create your own function, and use the postie_post filter.
|
189 |
-
See the filterPostie.php.sample file for examples.</p>
|
190 |
-
|
191 |
-
<h4 id='answer-16'>Is the IMAP extension required for postie?</h4>
|
192 |
-
|
193 |
-
<p>The IMAP extension is not required, but it is strongly recommended, especially
|
194 |
-
is you are using non-English text. There is more information on php.net about
|
195 |
-
installing the IMAP extension. If you have control over your server, it is
|
196 |
-
often not hard to install.</p>
|
197 |
-
|
198 |
-
<p>On Ubuntu, try</p>
|
199 |
-
|
200 |
-
<pre><code>sudo apt-get install php5-imap</code></pre>
|
201 |
-
|
202 |
-
<p>On Fedora, try</p>
|
203 |
-
|
204 |
-
<pre><code>sudo yuminstall php-imap</code></pre>
|
205 |
-
|
206 |
-
<p>The IMAP extension is known to be installed on the following popular webhosts:
|
207 |
-
* Dreamhost</p>
|
208 |
-
|
209 |
-
<h4 id='answer-17'>How can I embed youtube or vimeo videos?</h4>
|
210 |
-
|
211 |
-
<p>Simply put the url in the body of your e-mail. (Make sure that you have the
|
212 |
-
option to convert url into links turned on)</p>
|
213 |
-
|
214 |
-
<h4 id='answer-18'>Something is going wrong, how do I see what is happening?</h4>
|
215 |
-
|
216 |
-
<p>Add the following lines to your wp-config.php file</p>
|
217 |
-
|
218 |
-
<pre><code>define('WP_DEBUG', true);
|
219 |
-
define('WP_DEBUG_LOG', true);
|
220 |
-
define('POSTIE_DEBUG', true);</code></pre>
|
221 |
-
|
222 |
-
<p>Various errors, warning and informational will be written to the wp-content\debug.log
|
223 |
-
file. There may also be all sorts of warnings and messages in your site as well
|
224 |
-
depending on how well behaved your other plugins and themes are, so you will not
|
225 |
-
want to leave these settings set to true all the time.</p>
|
226 |
-
|
227 |
-
<h4 id='answer-19'>Why doesn't Postie automatically publish my emails when running manually works</h4>
|
228 |
-
|
229 |
-
<p>WordPress cron (which Postie relies on) doesn't run unless a page is accessed on the
|
230 |
-
site. So if you send an email, but nobody accesses the site for 3 days Postie won't
|
231 |
-
be given the chance to fetch the email and publish the post.</p>
|
232 |
-
|
233 |
-
<p>To ensure that Postie runs smoothly on a low or no volume site you need to ensure that
|
234 |
-
a page gets hit (any page is fine). Use something like cron + curl on Linux or install
|
235 |
-
curl on Windows and use the Scheduled Tasks control panel. If you are using a hosting company
|
236 |
-
that doesn't allow you access to cron you can use a service like
|
237 |
-
<a href="https://www.setcronjob.com/">SetCronJob</a>.</p>
|
238 |
-
|
239 |
-
<p>It is also possible to turn the WordPress cron off. Please make sure something like</p>
|
240 |
-
|
241 |
-
<pre><code>define('DISABLE_WP_CRON', true);</code></pre>
|
242 |
-
|
243 |
-
<p>is not in your wp-config.php file.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
images/Thumbs.db
DELETED
Binary file
|
images/valid-xhtml10-blue.png
DELETED
Binary file
|
images/vcss-blue.gif
DELETED
Binary file
|
postie-functions.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
$Id: postie-functions.php
|
4 |
*/
|
5 |
|
6 |
//to turn on debug output add the following line to wp-config.php
|
@@ -1889,6 +1889,15 @@ function postie_handle_upload(&$file, $overrides = false, $time = null) {
|
|
1889 |
}
|
1890 |
|
1891 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1892 |
$file = apply_filters('wp_handle_upload_prefilter', $file);
|
1893 |
|
1894 |
// You may define your own function and pass the name in $overrides['upload_error_handler']
|
@@ -1923,10 +1932,6 @@ function postie_handle_upload(&$file, $overrides = false, $time = null) {
|
|
1923 |
if (!file_exists($file['tmp_name'])) {
|
1924 |
return $upload_error_handler($file, __('Specified file failed upload test.'));
|
1925 |
}
|
1926 |
-
// A correct MIME type will pass this test. Override $mimes or use the upload_mimes filter.
|
1927 |
-
|
1928 |
-
$wp_filetype = wp_check_filetype($file['name']);
|
1929 |
-
DebugEcho("postie_handle_upload: detected file type for " . $file['name'] . " is " . $wp_filetype['type']);
|
1930 |
|
1931 |
extract($wp_filetype);
|
1932 |
|
1 |
<?php
|
2 |
/*
|
3 |
+
$Id: postie-functions.php 993640 2014-09-19 23:45:30Z WayneAllen $
|
4 |
*/
|
5 |
|
6 |
//to turn on debug output add the following line to wp-config.php
|
1889 |
}
|
1890 |
|
1891 |
}
|
1892 |
+
|
1893 |
+
// A correct MIME type will pass this test. Override $mimes or use the upload_mimes filter.
|
1894 |
+
$wp_filetype = wp_check_filetype($file['name']);
|
1895 |
+
DebugEcho("postie_handle_upload: detected file type for " . $file['name'] . " is " . $wp_filetype['type']);
|
1896 |
+
|
1897 |
+
if (!isset($file['type'])) {
|
1898 |
+
DebugEcho("postie_handle_upload: adding type - " . $wp_filetype['type']);
|
1899 |
+
$file['type'] = $wp_filetype['type'];
|
1900 |
+
}
|
1901 |
$file = apply_filters('wp_handle_upload_prefilter', $file);
|
1902 |
|
1903 |
// You may define your own function and pass the name in $overrides['upload_error_handler']
|
1932 |
if (!file_exists($file['tmp_name'])) {
|
1933 |
return $upload_error_handler($file, __('Specified file failed upload test.'));
|
1934 |
}
|
|
|
|
|
|
|
|
|
1935 |
|
1936 |
extract($wp_filetype);
|
1937 |
|
postie.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: Postie
|
5 |
Plugin URI: http://PostiePlugin.com/
|
6 |
Description: Create posts via email. Signifigantly upgrades the Post by Email features of Word Press.
|
7 |
-
Version: 1.6.
|
8 |
Author: Wayne Allen
|
9 |
Author URI: http://allens-home.com/
|
10 |
License: GPL2
|
@@ -27,10 +27,11 @@
|
|
27 |
*/
|
28 |
|
29 |
/*
|
30 |
-
$Id: postie.php
|
31 |
*/
|
|
|
32 |
|
33 |
-
define('POSTIE_VERSION', '1.6.
|
34 |
define("POSTIE_ROOT", dirname(__FILE__));
|
35 |
define("POSTIE_URL", WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)));
|
36 |
|
@@ -59,7 +60,6 @@ if (isset($_GET["postie_read_me"])) {
|
|
59 |
}
|
60 |
//Add Menu Configuration
|
61 |
if (is_admin()) {
|
62 |
-
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "postie-functions.php");
|
63 |
if (function_exists('load_plugin_textdomain')) {
|
64 |
|
65 |
function postie_load_domain() {
|
@@ -77,8 +77,8 @@ if (is_admin()) {
|
|
77 |
function postie_plugin_row_meta($links, $file) {
|
78 |
if (strpos($file, plugin_basename(__FILE__)) !== false) {
|
79 |
$new_links = array(
|
80 |
-
|
81 |
-
|
82 |
);
|
83 |
|
84 |
$links = array_merge($links, $new_links);
|
@@ -99,7 +99,6 @@ function postie_query_vars($vars) {
|
|
99 |
|
100 |
function postie_parse_request($wp) {
|
101 |
if (array_key_exists('postie', $wp->query_vars)) {
|
102 |
-
require_once(plugin_dir_path(__FILE__) . "postie-functions.php");
|
103 |
switch ($wp->query_vars['postie']) {
|
104 |
case 'get-mail':
|
105 |
postie_get_mail();
|
@@ -257,33 +256,8 @@ function postie_whitelist($options) {
|
|
257 |
|
258 |
//don't use DebugEcho or EchoInfo here as it is not defined when called as an action
|
259 |
function check_postie() {
|
260 |
-
|
261 |
-
|
262 |
-
$fullurl = plugins_url("get_mail.php", __FILE__);
|
263 |
-
preg_match("/https?:\/\/(.[^\/]*)(.*)/i", $fullurl, $matches);
|
264 |
-
$host = $matches[1];
|
265 |
-
|
266 |
-
$url = "";
|
267 |
-
if (isset($matches[2])) {
|
268 |
-
$url = $matches[2];
|
269 |
-
}
|
270 |
-
|
271 |
-
$port = is_ssl() ? 443 : 80;
|
272 |
-
|
273 |
-
$fp = fsockopen($host, $port, $errno, $errstr);
|
274 |
-
if ($fp) {
|
275 |
-
fputs($fp, "GET $url HTTP/1.0\r\n");
|
276 |
-
fputs($fp, "User-Agent: Cronless-Postie\r\n");
|
277 |
-
fputs($fp, "Host: $host\r\n");
|
278 |
-
fputs($fp, "\r\n");
|
279 |
-
$page = '';
|
280 |
-
while (!feof($fp)) {
|
281 |
-
$page.=fgets($fp, 128);
|
282 |
-
}
|
283 |
-
fclose($fp);
|
284 |
-
} else {
|
285 |
-
error_log("Cannot connect to server on port $port. Please check to make sure that this port is open on your webhost. Additional information: $errno: $errstr");
|
286 |
-
}
|
287 |
}
|
288 |
|
289 |
function postie_cron($interval = false) {
|
4 |
Plugin Name: Postie
|
5 |
Plugin URI: http://PostiePlugin.com/
|
6 |
Description: Create posts via email. Signifigantly upgrades the Post by Email features of Word Press.
|
7 |
+
Version: 1.6.2
|
8 |
Author: Wayne Allen
|
9 |
Author URI: http://allens-home.com/
|
10 |
License: GPL2
|
27 |
*/
|
28 |
|
29 |
/*
|
30 |
+
$Id: postie.php 994866 2014-09-22 17:19:43Z WayneAllen $
|
31 |
*/
|
32 |
+
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "postie-functions.php");
|
33 |
|
34 |
+
define('POSTIE_VERSION', '1.6.2');
|
35 |
define("POSTIE_ROOT", dirname(__FILE__));
|
36 |
define("POSTIE_URL", WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)));
|
37 |
|
60 |
}
|
61 |
//Add Menu Configuration
|
62 |
if (is_admin()) {
|
|
|
63 |
if (function_exists('load_plugin_textdomain')) {
|
64 |
|
65 |
function postie_load_domain() {
|
77 |
function postie_plugin_row_meta($links, $file) {
|
78 |
if (strpos($file, plugin_basename(__FILE__)) !== false) {
|
79 |
$new_links = array(
|
80 |
+
'<a href="http://postieplugin.com/" target="_blank">Support</a>',
|
81 |
+
'<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HPK99BJ88V4C2" target="_blank">Donate</a>'
|
82 |
);
|
83 |
|
84 |
$links = array_merge($links, $new_links);
|
99 |
|
100 |
function postie_parse_request($wp) {
|
101 |
if (array_key_exists('postie', $wp->query_vars)) {
|
|
|
102 |
switch ($wp->query_vars['postie']) {
|
103 |
case 'get-mail':
|
104 |
postie_get_mail();
|
256 |
|
257 |
//don't use DebugEcho or EchoInfo here as it is not defined when called as an action
|
258 |
function check_postie() {
|
259 |
+
error_log("check_postie");
|
260 |
+
postie_get_mail();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
}
|
262 |
|
263 |
function postie_cron($interval = false) {
|
readme.html
DELETED
@@ -1,7 +0,0 @@
|
|
1 |
-
<html>
|
2 |
-
<head><title>302 Found</title></head>
|
3 |
-
<body bgcolor="white">
|
4 |
-
<center><h1>302 Found</h1></center>
|
5 |
-
<hr><center>nginx</center>
|
6 |
-
</body>
|
7 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -6,14 +6,14 @@ Plugin URI: http://PostiePlugin.com/
|
|
6 |
Tags: e-mail, email, post-by-email
|
7 |
Requires at least: 3.0
|
8 |
Tested up to: 4.0
|
9 |
-
Stable tag: 1.6.
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
13 |
Postie allows you to create posts via email, including many advanced features not found in WordPress's default Post by Email feature.
|
14 |
|
15 |
== Description ==
|
16 |
-
Postie offers many advanced features for creating posts
|
17 |
including the ability to assign categories by name, included pictures and
|
18 |
videos, and automatically strip off signatures. It also has support for both
|
19 |
IMAP and POP3, with the option for ssl with both. For usage notes, see the
|
@@ -53,7 +53,9 @@ More info at http://PostiePlugin.com/
|
|
53 |
5. Even more message options
|
54 |
6. Image options
|
55 |
7. Video and Audio options
|
56 |
-
8. Attachment options
|
|
|
|
|
57 |
* Either:
|
58 |
* Put the postie.zip file in wp-content/plugins/ and unzip it
|
59 |
* Or:
|
@@ -64,52 +66,7 @@ More info at http://PostiePlugin.com/
|
|
64 |
* Goto to the "Settings" tab and click on the sub-tab "Postie" to configure it.
|
65 |
* Make sure you enter the mailserver information correctly, including the type
|
66 |
of connection and the port number. Common port configurations:
|
67 |
-
* pop3: 110
|
68 |
-
* pop3-ssl: 995
|
69 |
-
* imap: 143
|
70 |
-
* imap-ssl: 993
|
71 |
* (Postie ignores the settings under Settings->Writing->Writing-by-Email)
|
72 |
-
|
73 |
-
= Automating checking e-mail =
|
74 |
-
WordPress cron (which Postie relies on) doesn't run unless a page is accessed on
|
75 |
-
the site. So if you send an email, but nobody accesses the site for 3 days Postie
|
76 |
-
won't be given the chance to fetch the email and publish the post.
|
77 |
-
|
78 |
-
To ensure that Postie runs smoothly on a low or no volume site you need to ensure
|
79 |
-
that a page gets hit (any page is fine). Use something like cron + curl on Linux
|
80 |
-
or install curl on Windows and use the Scheduled Tasks control panel. If you are
|
81 |
-
using a hosting company that doesn't allow you access to cron you can use a service
|
82 |
-
like SetCronJob.
|
83 |
-
|
84 |
-
By default, postie checks for new e-mail every 30 minutes. You can select from
|
85 |
-
a number of different checking intervals in the settings page, under the
|
86 |
-
Mailserver tab.
|
87 |
-
|
88 |
-
= Forcing e-mail check =
|
89 |
-
If you would prefer to have more fine-grained control of how postie checks
|
90 |
-
for mail, you can also set up a crontab. This is for advanced users only.
|
91 |
-
|
92 |
-
Setup a cronjob to pull down the get\_mail.php - note that every time you access
|
93 |
-
get\_mail.php Postie will run - it is like clicking Run Postie on the Admin screen.
|
94 |
-
|
95 |
-
= Linux =
|
96 |
-
If your site runs on a UNIX/linux server, and you have shell access, you can
|
97 |
-
enable mail checking using cron.
|
98 |
-
|
99 |
-
Examples:
|
100 |
-
|
101 |
-
*/5 * * * * /usr/bin/lynx --source http://blog.robfelty.com/wp-content/plugins/postie/get\_mail.php >/dev/null 2>&1
|
102 |
-
|
103 |
-
This fetches the mail every five minutes with lynx
|
104 |
-
|
105 |
-
*/10 * * * * /usr/bin/wget -O /dev/null http://blog.robfelty.com/wp-content/plugins/postie/get\_mail.php >/dev/null 2>&1
|
106 |
-
|
107 |
-
This fetches the mail every ten minutes with wget
|
108 |
-
|
109 |
-
= Windows =
|
110 |
-
You will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or [curl](http://curl.haxx.se/dlwiz/)
|
111 |
-
Then use the Task Scheduler control panel to call wget or cron.
|
112 |
-
|
113 |
== Usage ==
|
114 |
= Specifying Beginning and Ending of Post =
|
115 |
* If you put in :start - the message processing won't start until it sees that string.
|
@@ -251,206 +208,7 @@ Then use the Task Scheduler control panel to call wget or cron.
|
|
251 |
|
252 |
== Frequently Asked Questions ==
|
253 |
|
254 |
-
|
255 |
-
|
256 |
-
Make sure the port you are using is open. For example, bluehost seems to block
|
257 |
-
ports 993 and 995 (for pop3-ssl and imap-ssl) by default. I have heard that
|
258 |
-
you can request that they open them for you ( you might have to pay extra).
|
259 |
-
|
260 |
-
You can check for open ports with the following command on your server:
|
261 |
-
`netstat -ln|grep -E ':::(993|995|143)'`
|
262 |
-
|
263 |
-
If nothing shows up, then the ports are not open.
|
264 |
-
|
265 |
-
= How can I get postie to display inline images? =
|
266 |
-
|
267 |
-
Make sure that you send e-mail formatted as html (richtext), and set postie to
|
268 |
-
prefer html messages (in the message tab of the postie settings)
|
269 |
-
|
270 |
-
= Mail is not showing up right when I send html (rich formatted) e-mail! =
|
271 |
-
|
272 |
-
Make sure you set the preferred text type to html
|
273 |
-
|
274 |
-
= Do I need to any code to my theme for postie to work? =
|
275 |
-
|
276 |
-
No.
|
277 |
-
|
278 |
-
= I read somewhere to add an iframe to my footer. Should I do this? =
|
279 |
-
|
280 |
-
No. Do not add an iframe in your footer to get postie to check mail
|
281 |
-
periodically. To check e-mail periodically, either set-up a cron job, or use
|
282 |
-
cronless postie. See installation instructions
|
283 |
-
|
284 |
-
= My mail host requires SSL, but postie will not allow me to select pop3-ssl or imap-ssl =
|
285 |
-
|
286 |
-
You must have php-imap installed on your server for this to work. Ask your
|
287 |
-
hosting provider about this.
|
288 |
-
|
289 |
-
= Can I use postie to check a gmail account? =
|
290 |
-
|
291 |
-
Yes. You can use either pop3-ssl or imap-ssl with a gmail account (including Google Apps). Before
|
292 |
-
attempting to use with postie, make sure that you enable pop or imap in your
|
293 |
-
gmail preferences.
|
294 |
-
|
295 |
-
* Pop3 settings:
|
296 |
-
* protocol - pop3-ssl
|
297 |
-
* Use Transport Layer Security - no
|
298 |
-
* server - pop.gmail.com
|
299 |
-
* port - 995
|
300 |
-
* userid - your full email address
|
301 |
-
* password - your password
|
302 |
-
* IMAP settings:
|
303 |
-
* protocol - imap-ssl
|
304 |
-
* Use Transport Layer Security - no
|
305 |
-
* server - imap.gmail.com
|
306 |
-
* port - 993
|
307 |
-
* userid - your full email address
|
308 |
-
* password - your password
|
309 |
-
|
310 |
-
= Can I use postie with GoDaddy hosting? =
|
311 |
-
|
312 |
-
Yes, but you must use an email set up using the GoDaddy email service and the following settings:
|
313 |
-
|
314 |
-
* protocol - pop3
|
315 |
-
* Use Transport Layer Security - no
|
316 |
-
* server - pop.secureserver.net
|
317 |
-
* port - 110
|
318 |
-
* userid - xxxxx@yourdomain
|
319 |
-
* password - your password
|
320 |
-
|
321 |
-
GoDaddy hosting does not allow you to connect to non-GoDaddy mail servers like Gmail.
|
322 |
-
|
323 |
-
= My posts show up as being posted by 'admin' instead of me. Why? =
|
324 |
-
|
325 |
-
If your admin account is linked to bar@gmail.com, and you send mail from
|
326 |
-
bar@gmail.com, it will show up as being posted by admin. If you have a
|
327 |
-
wordpress user named "John Doe", which is linked to johndoe@gmail.com, make
|
328 |
-
sure that you send e-mails from johndoe@gmail.com. It doesn't matter which
|
329 |
-
e-mail address postie is checking. That is, if you send mail from
|
330 |
-
johndoe@gmail.com to foo@gmail.com, it gets posted as "John Doe".
|
331 |
-
|
332 |
-
If you send an e-mail to your postie address from an e-mail address that is no
|
333 |
-
t linked to a wordpress user, it will get posted as admin.
|
334 |
-
|
335 |
-
= Images aren't showing up at all? =
|
336 |
-
|
337 |
-
There are a couple possible reasons for this. First, check to see if you can
|
338 |
-
add an image through wordpress's normal posting mechanism. If not, then there
|
339 |
-
is probably 1 or 2 problems:
|
340 |
-
1. Your server does not have the php-gd library installed. Ask your hosting
|
341 |
-
provider about this.
|
342 |
-
|
343 |
-
2. Your wp-content/uploads directory is not writable by the webserver. Make
|
344 |
-
sure that it is
|
345 |
-
|
346 |
-
= Can I delete the wp-files directory needed by postie version <1.3.0? =
|
347 |
-
|
348 |
-
If you have posts published already by older versions of postie, getting rid
|
349 |
-
of those directories will delete any files you might have had associated with
|
350 |
-
those old posts. If you don't have any such posts, then you can safely delete
|
351 |
-
them.
|
352 |
-
|
353 |
-
= How can I get rid of stupid stuff my e-mail provider adds to my messages? =
|
354 |
-
|
355 |
-
To strip off stuff that they add at the beginning of a message, start your
|
356 |
-
post with :start
|
357 |
-
|
358 |
-
To strip off stuff that they add at the end of a message, end your
|
359 |
-
post with :end
|
360 |
-
|
361 |
-
= How can I add custom attachment icons? =
|
362 |
-
|
363 |
-
Simply upload the icons you want to the postie/icons/custom directory. You
|
364 |
-
must name the icons according to the following scheme:
|
365 |
-
`{filetype}-{size}.png`
|
366 |
-
|
367 |
-
NOTE THAT ANY CUSTOM FILES ADDED TO THE POSTIE DIRECTORY WILL BE DELETED IF YOU
|
368 |
-
USE THE NORMAL WORDPRESS UPGRADE PROCESS.
|
369 |
-
|
370 |
-
For example, for word documents, you could use:
|
371 |
-
|
372 |
-
`doc-32.png`
|
373 |
-
|
374 |
-
for a 32x32 pixel icon. (You can actually create any size icon you want, but
|
375 |
-
if you name it 32, then it will only be used if you select to use size 32
|
376 |
-
icons)
|
377 |
-
|
378 |
-
See the other directories in icons for more examples.
|
379 |
-
|
380 |
-
Currently the following filetypes are supported:
|
381 |
-
|
382 |
-
* doc - microsoft word (including docx)
|
383 |
-
* ppt - microsoft powerpoint (including pptx)
|
384 |
-
* xls - microsoft excel (including xlsx)
|
385 |
-
* numbers - iWork numbres spreadsheet
|
386 |
-
* pages - iWork pages document
|
387 |
-
* key - iWork keynote presentation
|
388 |
-
* pdf - portable document format
|
389 |
-
* rtf - rich text format
|
390 |
-
* txt - plain text document
|
391 |
-
|
392 |
-
= Can I add special text to the body of the post when using postie? =
|
393 |
-
|
394 |
-
Yes. You can create your own function, and use the postie_post filter.
|
395 |
-
Two short examples are included in the filterPostie.php.sample file
|
396 |
-
|
397 |
-
= Can I add special text to the title of the post when using postie? =
|
398 |
-
|
399 |
-
Yes. You can create your own function, and use the postie_post filter.
|
400 |
-
Two short examples are included in the filterPostie.php.sample file
|
401 |
-
|
402 |
-
= Can I select tags or categories based on the content of the e-mail? =
|
403 |
-
|
404 |
-
Yes. You can create your own function, and use the postie_post filter.
|
405 |
-
See the filterPostie.php.sample file for examples.
|
406 |
-
|
407 |
-
= Is the IMAP extension required for postie? =
|
408 |
-
|
409 |
-
The IMAP extension is not required, but it is strongly recommended, especially
|
410 |
-
is you are using non-English text. There is more information on php.net about
|
411 |
-
installing the IMAP extension. If you have control over your server, it is
|
412 |
-
often not hard to install.
|
413 |
-
|
414 |
-
On Ubuntu, try
|
415 |
-
`sudo apt-get install php5-imap`
|
416 |
-
|
417 |
-
On Fedora, try
|
418 |
-
`sudo yuminstall php-imap`
|
419 |
-
|
420 |
-
The IMAP extension is known to be installed on the following popular webhosts:
|
421 |
-
* Dreamhost
|
422 |
-
|
423 |
-
= How can I embed youtube or vimeo videos? =
|
424 |
-
|
425 |
-
Simply put the url in the body of your e-mail. (Make sure that you have the
|
426 |
-
option to convert url into links turned on)
|
427 |
-
|
428 |
-
= Something is going wrong, how do I see what is happening? =
|
429 |
-
|
430 |
-
Add the following lines to your wp-config.php file
|
431 |
-
`define('WP_DEBUG', true);
|
432 |
-
define('WP_DEBUG_LOG', true);
|
433 |
-
define('POSTIE_DEBUG', true);`
|
434 |
-
|
435 |
-
Various errors, warning and informational will be written to the wp-content\debug.log
|
436 |
-
file. There may also be all sorts of warnings and messages in your site as well
|
437 |
-
depending on how well behaved your other plugins and themes are, so you will not
|
438 |
-
want to leave these settings set to true all the time.
|
439 |
-
|
440 |
-
= Why doesn't Postie automatically publish my emails when running manually works =
|
441 |
-
|
442 |
-
WordPress cron (which Postie relies on) doesn't run unless a page is accessed on the
|
443 |
-
site. So if you send an email, but nobody accesses the site for 3 days Postie won't
|
444 |
-
be given the chance to fetch the email and publish the post.
|
445 |
-
|
446 |
-
To ensure that Postie runs smoothly on a low or no volume site you need to ensure that
|
447 |
-
a page gets hit (any page is fine). Use something like cron + curl on Linux or install
|
448 |
-
curl on Windows and use the Scheduled Tasks control panel. If you are using a hosting company
|
449 |
-
that doesn't allow you access to cron you can use a service like
|
450 |
-
<a href="https://www.setcronjob.com/" target="_blank">SetCronJob</a>.
|
451 |
-
|
452 |
-
It is also possible to turn the WordPress cron off. Please make sure something like
|
453 |
-
`define('DISABLE_WP_CRON', true);` is not in your wp-config.php file.
|
454 |
== Upgrade Notice ==
|
455 |
|
456 |
= 1.6.0 =
|
@@ -480,6 +238,11 @@ All script, style and body tags are stripped from html emails.
|
|
480 |
Attachments are now processed in the order they were attached.
|
481 |
|
482 |
== CHANGELOG ==
|
|
|
|
|
|
|
|
|
|
|
483 |
= 1.6.1 (2014.09.19) =
|
484 |
* Allow negative time corrections
|
485 |
* Fix links to settings page
|
6 |
Tags: e-mail, email, post-by-email
|
7 |
Requires at least: 3.0
|
8 |
Tested up to: 4.0
|
9 |
+
Stable tag: 1.6.2
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
13 |
Postie allows you to create posts via email, including many advanced features not found in WordPress's default Post by Email feature.
|
14 |
|
15 |
== Description ==
|
16 |
+
Postie offers many advanced features for creating posts by email,
|
17 |
including the ability to assign categories by name, included pictures and
|
18 |
videos, and automatically strip off signatures. It also has support for both
|
19 |
IMAP and POP3, with the option for ssl with both. For usage notes, see the
|
53 |
5. Even more message options
|
54 |
6. Image options
|
55 |
7. Video and Audio options
|
56 |
+
8. Attachment options
|
57 |
+
|
58 |
+
== Installation ==
|
59 |
* Either:
|
60 |
* Put the postie.zip file in wp-content/plugins/ and unzip it
|
61 |
* Or:
|
66 |
* Goto to the "Settings" tab and click on the sub-tab "Postie" to configure it.
|
67 |
* Make sure you enter the mailserver information correctly, including the type
|
68 |
of connection and the port number. Common port configurations:
|
|
|
|
|
|
|
|
|
69 |
* (Postie ignores the settings under Settings->Writing->Writing-by-Email)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
== Usage ==
|
71 |
= Specifying Beginning and Ending of Post =
|
72 |
* If you put in :start - the message processing won't start until it sees that string.
|
208 |
|
209 |
== Frequently Asked Questions ==
|
210 |
|
211 |
+
Please visit our FAQ page at <a href="http://postieplugin.com/faq/">http://postieplugin.com/faq/</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
== Upgrade Notice ==
|
213 |
|
214 |
= 1.6.0 =
|
238 |
Attachments are now processed in the order they were attached.
|
239 |
|
240 |
== CHANGELOG ==
|
241 |
+
= 1.6.2 (2014.09.22) =
|
242 |
+
* Moved FAQ and Help to PostiePlugin.com
|
243 |
+
* Fixed file type issue with wp_handle_upload_prefilter()
|
244 |
+
* Fixed cron issue
|
245 |
+
|
246 |
= 1.6.1 (2014.09.19) =
|
247 |
* Allow negative time corrections
|
248 |
* Fix links to settings page
|