Changeset 777053
- Timestamp:
- 09/23/2013 02:40:57 AM (13 years ago)
- Location:
- post-by-email/trunk
- Files:
-
- 3 edited
-
class-post-by-email-admin.php (modified) (2 diffs)
-
readme.md (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
post-by-email/trunk/class-post-by-email-admin.php
r777051 r777053 24 24 return self::$instance; 25 25 } 26 27 /** 28 * Help tabs for the settings page. 29 * 30 * @since 1.0.4 31 */ 32 public static $help_tabs = array( 33 'post-by-email' => array( 34 'title' => 'Post By Email', 35 'content' => 'Post By Email allows you to send your WordPress site an email with the content of your post. You must set up a special-purpose e-mail account with IMAP or POP3 access to use this, and any mail received at this address will be posted, so it’s a good idea to keep this address very secret.</p><p>For detailed installation and configuration instructions, see the links to the right.', 36 ), 37 'mailserver' => array( 38 'title' => 'Mailbox Settings', 39 'content' => 'If you’re not sure what to put here and the defaults don’t work, ask your email provider for the correct settings. Here are links to the settings for some common email providers:<li><a href="https://support.google.com/mail/troubleshooter/1668960?hl=en">Gmail</a></li><li><a href="http://help.yahoo.com/kb/index?page=content&id=SLN4075">Yahoo</a></li><li><a href="http://windows.microsoft.com/en-ca/windows/outlook/send-receive-from-app">Outlook.com</a></li>Note that you might also have to enable POP/IMAP access via your email provider.', 40 ), 41 'security' => array( 42 'title' => 'Security', 43 'content' => 'If you’ve set a PIN for authentication, you will need to specify it somewhere in your email message using the following shortcode:<p><kbd>[pin abc123]</kbd><p>(Replace abc123 with the PIN you chose.)</p><p>Mail that doe not contain this PIN will be discarded!', 44 ), 45 'shortcodes' => array( 46 'title' => 'Shortcodes', 47 'content' => 'You can specify categories, tags and custom taxonomy terms in your email by including shortcodes. If no categories or tags are specified, the post will be created in the default category.</p><p>You can also include a gallery shortcode to specify gallery options for any attachments.</p><p>Shortcode examples can be found on the <a href="http://wordpress.org/plugins/post-by-email/">plugin page</a>.', 48 ), 49 ); 26 50 27 51 /** … … 198 222 array( $this, 'display_plugin_admin_page' ) 199 223 ); 200 WP_Screen::get($this->plugin_screen_hook_suffix)->add_help_tab( array( 201 'id' => 'options-postemail', 202 'title' => __( 'Post Via Email' ), 203 'content' => '<p>' . __( 'Post via email settings allow you to send your WordPress install an email with the content of your post. You must set up a secret e-mail account with POP3 access to use this, and any mail received at this address will be posted, so it’s a good idea to keep this address very secret.', 'post-by-email' ) . '</p>', 204 ) 224 $screen = WP_Screen::get( $this->plugin_screen_hook_suffix); 225 foreach ( self::$help_tabs as $id => $data ) { 226 $screen->add_help_tab( array( 227 'id' => $id, 228 'title' => __( $data['title'], 'post-by-email' ), 229 'content' => '', 230 'callback' => array( $this, 'show_help_tabs' ) 231 ) 232 ); 233 } 234 $screen->set_help_sidebar( 235 '<p><strong>' . __( 'For more information:', 'post-by-email' ) . '</strong></p>' . 236 '<p>' . __( '<a href="http://wordpress.org/plugins/post-by-email/installation" target="_blank">Installation</a>', 'post-by-email' ) . '</p>' . 237 '<p>' . __( '<a href="http://wordpress.org/plugins/post-by-email/" target="_blank">Usage</a>', 'post-by-email' ) . '</p>' . 238 '<p>' . __( '<a href="http://wordpress.org/support/plugin/post-by-email" target="_blank">Support Forums</a>', 'post-by-email' ) . '</p>' 205 239 ); 240 } 241 242 /** 243 * Prints out the content for the contextual help tabs. 244 * 245 * @since 1.0.4 246 */ 247 public function show_help_tabs( $screen, $tab ) { 248 printf( 249 '<p>%s</p>', 250 __( $tab['callback'][0]::$help_tabs[ $tab['id'] ]['content'], 'post-by-email' ) 251 ); 206 252 } 207 253 -
post-by-email/trunk/readme.md
r773033 r777053 11 11 ## Description ## 12 12 13 **Warning:** This plugin is currently a very earlybeta! Use at your own risk and please report any bugs, either on the [WordPress Support forums](http://wordpress.org/support/plugin/post-by-email) or via the [Github issues page](https://github.com/codebykat/wp-post-by-email/issues).13 **Warning:** This plugin is currently in beta! Use at your own risk and please report any bugs, either on the [WordPress Support forums](http://wordpress.org/support/plugin/post-by-email) or via the [Github issues page](https://github.com/codebykat/wp-post-by-email/issues). 14 14 15 Any new messages sent to the configured email address will be posted to the blog. This plugin replaces the functionality that used to live in core. 15 Any new messages sent to the configured email address will be posted to the blog. This plugin replaces the functionality that used to live in WordPress core. 16 17 Once an email has been successfully posted to the blog, it can either be marked as read (IMAP servers only) or deleted from the mailbox. 18 19 Updates on the project can be found on the [Make WordPress Core blog](http://make.wordpress.org/core/tag/post-by-email/). 20 21 22 **Features** 23 * Supports IMAP or POP3 servers, with or without SSL 24 * Optional PIN-based authentication guards against email spoofing 25 * Uses WordPress's built-in roles to manage which users can post 26 * Set categories, tags and custom taxonomies by including shortcodes in your email 27 * Email attachments will automatically be added to the post's gallery 28 * Emails from unauthorized users can be either set as pending or discarded 29 30 ### Post Authors and Security ### 16 31 17 32 The "From" address is matched to WordPress users in the database to determine the post's author. If the author doesn't have an account or isn't allowed to publish posts, the post status will be set to "pending". 18 33 19 Once an email has been successfully posted to the blog, it will either be marked as read (IMAP servers only) or deleted from the mailbox.34 By default, any users in the Author, Editor or Administrator roles are able to publish posts. Use the Users menu item in the admin dashboard to view and manage which users have this capability. For more information on the WordPress permissions system, see <a href="http://codex.wordpress.org/Roles_and_Capabilities">Codex: Roles and Capabilities</a>. 20 35 21 You can set categories, tags and custom taxonomy terms on your posts by including shortcodes in your email. These should be space-separated. Use slugs for tags (and non-hierarchical taxonomies) and either slugs or IDs for categories (/ hierarchical taxonomies). Terms that do not yet exist will be created. Examples: 22 `[category posted-by-email another-category]` 36 ### Shortcodes ### 37 38 By default, emailed posts will be placed in the default category configured in the settings. 39 40 You can also set the categories, tags and custom taxonomy terms on your posts by including shortcodes in your email. These should be space-separated. Use slugs for tags (and non-hierarchical taxonomies) and either slugs or IDs for categories (/ hierarchical taxonomies). Terms that do not yet exist will be created. Examples: 41 42 **Categories:** Use either slugs or IDs. 43 `[category posted-by-email another-category]` 44 `[category 14]` 45 46 **Tags:** Use slugs. 23 47 `[tag cool-stuff]` 24 `[category 14]` 25 `[custom-taxonomy-name thing1 thing2]` 48 49 **Custom Taxonomies:** Use slugs for non-hierarchical taxonomies, and IDs for hierarchical. 50 `[custom-taxonomy-name thing1 thing2]` 26 51 `[another-custom-taxonomy 2 3 5]` 27 52 28 Updates on the project can be found on the [Make WordPress Core blog](http://make.wordpress.org/core/tag/post-by-email/). 53 ### Attachments ### 54 55 Any files attached to an email will be uploaded to the Media Library and added to the post as a gallery. You can specify gallery options, or its location within the post, by including a <a href="http://codex.wordpress.org/Gallery_Shortcode">gallery shortcode</a> in your email. If no gallery shortcode exists, it will be added to the end of the post. 56 29 57 30 58 ## Installation ## 31 59 32 60 1. See [Installing Plugins](http://codex.wordpress.org/Managing_Plugins#Installing_Plugins). 61 1. Set up an email address that will be used specifically to receive messages for your blog. 62 1. Make sure your email service is configured to allow external connections via POP3 or IMAP. 33 63 1. Activate the plugin through the 'Plugins' menu. 34 1. Configure mailbox information under plugin settings. 64 1. Configure mailbox information under Tools->Post By Email. 65 66 ### Instructions for specific email services ### 67 68 - Gmail: <a href="https://support.google.com/mail/troubleshooter/1668960?hl=en">This page</a> will walk you through enabling IMAP or POP3 access. When prompted to select an email client for configuration instructions, select "Other" to view the settings. 69 70 - Yahoo! Mail: Use these <a href="http://help.yahoo.com/kb/index?page=content&id=SLN4075">IMAP settings</a>; IMAP access should be enabled by default. Mail Plus subscribers can also use these <a href="http://help.yahoo.com/kb/index?locale=en_US&y=PROD_MAIL_ML&page=content&id=SLN4724">POP3 settings</a>. 71 72 - Outlook.com (Hotmail) settings and instructions can be found on <a href="http://windows.microsoft.com/en-ca/windows/outlook/send-receive-from-app">this page</a>. 35 73 36 74 37 ## Tests ##75 ## Frequently Asked Questions ## 38 76 39 Like WordPress Core, this plugin includes unit tests written in PHPUnit. 77 ### What timestamp will be used for posts? ### 78 Posts will be backdated to use the date and time they were received by the mailserver, NOT the time they were imported by the plugin. 40 79 41 To run the tests: 80 ### Will messages show up on my blog as soon as I send them? ### 81 No, emails are not "forwarded" to your blog. Just like any third-party mail client, Post By Email has to check for new messages, and will only do this once per hour (or when you click the "Check Now" button in the settings). In addition, because of how WordPress' task scheduling (wp_cron) works, this check will only be triggered when a page on your blog has been loaded. There is also sometimes a delay between when messages are sent and when they show up in the mailbox, especially with POP3 access. 82 83 ### I found a bug! ### 84 Oh no! I would like to know as much as possible about it so that I can fix it. For the information to include with a bug report, please see <a href="#reporting-bugs">Reporting Bugs</a>. 85 86 ### What does the error "Bad tagged response" mean? ### 87 This probably means you're trying to connect to a POP3 server over the IMAP port, or vice versa. Double-check your server URL, protocol and port number and try again. 88 89 90 ## Screenshots ## 91 ###1. Main settings page### 92  93 94 ###2. The activity log### 95  96 97 98 99 ## Testing ## 100 101 ### Automated Tests ### 102 103 Like WordPress Core, this plugin includes automated unit tests written in PHPUnit. 104 105 To run the unit tests: 42 106 43 107 1. Set up the WordPress testing library as described in [Handbook: Automated Testing](http://make.wordpress.org/core/handbook/automated-testing/). You can also do this [using WP-CLI](http://wp-cli.org/blog/plugin-unit-tests.html). 44 108 1. From the plugin directory, run `WP_TESTS_DIR=/path/to/WordPress/test/install phpunit` 45 109 110 ### Manual Testing ### 111 112 1. Set up a test email address (services such as Gmail work great for this) and enable IMAP or POP3 access. (Refer to <a href="http://wordpress.org/plugins/post-by-email/installation/">Installation</a> for detailed instructions.) 113 1. Verify that you are using the correct mailbox settings by using a third-party email client, such as Outlook or OSX Mail.app, to connect to your test mailbox. 114 1. Enter those settings into the Post By Email settings and save them. 115 1. Navigate to the "Activity Log" tab and press the "Check Now" button. When the page reloads, you should see a new entry in the log file describing the results of the mail check. 116 117 **Caveat** 118 There is sometimes a delay between sending an email and having it show up in the mailbox, especially with POP3. If you're using IMAP, you can connect using a third-party mail client to verify that messages have been received, then mark them as unread so Post By Email will pick them up. 119 120 121 ## Reporting Bugs ## 122 123 Before reporting a bug, make sure you've updated the plugin to the latest version. 124 125 Then, provide as much of the following information as possible: 126 127 1. WordPress version (e.g. 3.6.x). 128 1. Plugin version (e.g. 1.0.3). 129 1. PHP version (e.g. 5.2.x or 5.3.x). 130 1. Your mailbox settings (URL, protocol, port and whether SSL is enabled; not your login and password). 131 1. Any error messages displayed (it might help to <a href="http://codex.wordpress.org/WP_DEBUG">enable WP_DEBUG</a> in your wp-config.php). 132 1. If the issue is related to a specific email, the full email, including headers. Feel free to replace any personal information with dummy text (such as "sender@example.com"). <a href="https://support.google.com/groups/answer/75960?hl=en">This link</a> has instructions for viewing full message headers in Gmail, Outlook and Yahoo. 133 134 46 135 ## Changelog ## 136 137 ### 1.0.4 ### 138 * Added screenshots, expanded Readme and contextual help. 139 * Added support for user-included gallery shortcode (allows use of WP's gallery options). 140 * Added warning when checking email before changed settings have been saved. 141 * Code style fixes as per http://gsoc.trac.wordpress.org/ticket/377 142 * Fixed https://github.com/codebykat/wp-post-by-email/issues/3 47 143 48 144 ### 1.0.3 ### -
post-by-email/trunk/readme.txt
r773033 r777053 11 11 == Description == 12 12 13 **Warning:** This plugin is currently a very earlybeta! Use at your own risk and please report any bugs, either on the [WordPress Support forums](http://wordpress.org/support/plugin/post-by-email) or via the [Github issues page](https://github.com/codebykat/wp-post-by-email/issues).13 **Warning:** This plugin is currently in beta! Use at your own risk and please report any bugs, either on the [WordPress Support forums](http://wordpress.org/support/plugin/post-by-email) or via the [Github issues page](https://github.com/codebykat/wp-post-by-email/issues). 14 14 15 Any new messages sent to the configured email address will be posted to the blog. This plugin replaces the functionality that used to live in core. 15 Any new messages sent to the configured email address will be posted to the blog. This plugin replaces the functionality that used to live in WordPress core. 16 17 Once an email has been successfully posted to the blog, it can either be marked as read (IMAP servers only) or deleted from the mailbox. 18 19 Updates on the project can be found on the [Make WordPress Core blog](http://make.wordpress.org/core/tag/post-by-email/). 20 21 22 **Features** 23 * Supports IMAP or POP3 servers, with or without SSL 24 * Optional PIN-based authentication guards against email spoofing 25 * Uses WordPress's built-in roles to manage which users can post 26 * Set categories, tags and custom taxonomies by including shortcodes in your email 27 * Email attachments will automatically be added to the post's gallery 28 * Emails from unauthorized users can be either set as pending or discarded 29 30 ### Post Authors and Security ### 16 31 17 32 The "From" address is matched to WordPress users in the database to determine the post's author. If the author doesn't have an account or isn't allowed to publish posts, the post status will be set to "pending". 18 33 19 Once an email has been successfully posted to the blog, it will either be marked as read (IMAP servers only) or deleted from the mailbox.34 By default, any users in the Author, Editor or Administrator roles are able to publish posts. Use the Users menu item in the admin dashboard to view and manage which users have this capability. For more information on the WordPress permissions system, see <a href="http://codex.wordpress.org/Roles_and_Capabilities">Codex: Roles and Capabilities</a>. 20 35 21 You can set categories, tags and custom taxonomy terms on your posts by including shortcodes in your email. These should be space-separated. Use slugs for tags (and non-hierarchical taxonomies) and either slugs or IDs for categories (/ hierarchical taxonomies). Terms that do not yet exist will be created. Examples: 22 `[category posted-by-email another-category]` 36 ### Shortcodes ### 37 38 By default, emailed posts will be placed in the default category configured in the settings. 39 40 You can also set the categories, tags and custom taxonomy terms on your posts by including shortcodes in your email. These should be space-separated. Use slugs for tags (and non-hierarchical taxonomies) and either slugs or IDs for categories (/ hierarchical taxonomies). Terms that do not yet exist will be created. Examples: 41 42 **Categories:** Use either slugs or IDs. 43 `[category posted-by-email another-category]` 44 `[category 14]` 45 46 **Tags:** Use slugs. 23 47 `[tag cool-stuff]` 24 `[category 14]` 25 `[custom-taxonomy-name thing1 thing2]` 48 49 **Custom Taxonomies:** Use slugs for non-hierarchical taxonomies, and IDs for hierarchical. 50 `[custom-taxonomy-name thing1 thing2]` 26 51 `[another-custom-taxonomy 2 3 5]` 27 52 28 Updates on the project can be found on the [Make WordPress Core blog](http://make.wordpress.org/core/tag/post-by-email/). 53 ### Attachments ### 54 55 Any files attached to an email will be uploaded to the Media Library and added to the post as a gallery. You can specify gallery options, or its location within the post, by including a <a href="http://codex.wordpress.org/Gallery_Shortcode">gallery shortcode</a> in your email. If no gallery shortcode exists, it will be added to the end of the post. 56 29 57 30 58 == Installation == 31 59 32 60 1. See [Installing Plugins](http://codex.wordpress.org/Managing_Plugins#Installing_Plugins). 61 1. Set up an email address that will be used specifically to receive messages for your blog. 62 1. Make sure your email service is configured to allow external connections via POP3 or IMAP. 33 63 1. Activate the plugin through the 'Plugins' menu. 34 1. Configure mailbox information under plugin settings. 64 1. Configure mailbox information under Tools->Post By Email. 65 66 ### Instructions for specific email services ### 67 68 - Gmail: <a href="https://support.google.com/mail/troubleshooter/1668960?hl=en">This page</a> will walk you through enabling IMAP or POP3 access. When prompted to select an email client for configuration instructions, select "Other" to view the settings. 69 70 - Yahoo! Mail: Use these <a href="http://help.yahoo.com/kb/index?page=content&id=SLN4075">IMAP settings</a>; IMAP access should be enabled by default. Mail Plus subscribers can also use these <a href="http://help.yahoo.com/kb/index?locale=en_US&y=PROD_MAIL_ML&page=content&id=SLN4724">POP3 settings</a>. 71 72 - Outlook.com (Hotmail) settings and instructions can be found on <a href="http://windows.microsoft.com/en-ca/windows/outlook/send-receive-from-app">this page</a>. 35 73 36 74 37 == Tests ==75 == Frequently Asked Questions == 38 76 39 Like WordPress Core, this plugin includes unit tests written in PHPUnit. 77 = What timestamp will be used for posts? = 78 Posts will be backdated to use the date and time they were received by the mailserver, NOT the time they were imported by the plugin. 40 79 41 To run the tests: 80 = Will messages show up on my blog as soon as I send them? = 81 No, emails are not "forwarded" to your blog. Just like any third-party mail client, Post By Email has to check for new messages, and will only do this once per hour (or when you click the "Check Now" button in the settings). In addition, because of how WordPress' task scheduling (wp_cron) works, this check will only be triggered when a page on your blog has been loaded. There is also sometimes a delay between when messages are sent and when they show up in the mailbox, especially with POP3 access. 82 83 = I found a bug! = 84 Oh no! I would like to know as much as possible about it so that I can fix it. For the information to include with a bug report, please see the Reporting Bugs section in <a href="http://wordpress.org/plugins/post-by-email/other_notes/">Other Notes</a>. 85 86 = What does the error "Bad tagged response" mean? = 87 This probably means you're trying to connect to a POP3 server over the IMAP port, or vice versa. Double-check your server URL, protocol and port number and try again. 88 89 90 == Screenshots == 91 1. Main settings page 92 1. The activity log 93 94 95 == Testing == 96 97 ### Automated Tests ### 98 99 Like WordPress Core, this plugin includes automated unit tests written in PHPUnit. 100 101 To run the unit tests: 42 102 43 103 1. Set up the WordPress testing library as described in [Handbook: Automated Testing](http://make.wordpress.org/core/handbook/automated-testing/). You can also do this [using WP-CLI](http://wp-cli.org/blog/plugin-unit-tests.html). 44 104 1. From the plugin directory, run `WP_TESTS_DIR=/path/to/WordPress/test/install phpunit` 45 105 106 ### Manual Testing ### 107 108 1. Set up a test email address (services such as Gmail work great for this) and enable IMAP or POP3 access. (Refer to <a href="http://wordpress.org/plugins/post-by-email/installation/">Installation</a> for detailed instructions.) 109 1. Verify that you are using the correct mailbox settings by using a third-party email client, such as Outlook or OSX Mail.app, to connect to your test mailbox. 110 1. Enter those settings into the Post By Email settings and save them. 111 1. Navigate to the "Activity Log" tab and press the "Check Now" button. When the page reloads, you should see a new entry in the log file describing the results of the mail check. 112 113 **Caveat** 114 There is sometimes a delay between sending an email and having it show up in the mailbox, especially with POP3. If you're using IMAP, you can connect using a third-party mail client to verify that messages have been received, then mark them as unread so Post By Email will pick them up. 115 116 117 == Reporting Bugs == 118 119 Before reporting a bug, make sure you've updated the plugin to the latest version. 120 121 Then, provide as much of the following information as possible: 122 123 1. WordPress version (e.g. 3.6.x). 124 1. Plugin version (e.g. 1.0.3). 125 1. PHP version (e.g. 5.2.x or 5.3.x). 126 1. Your mailbox settings (URL, protocol, port and whether SSL is enabled; not your login and password). 127 1. Any error messages displayed (it might help to <a href="http://codex.wordpress.org/WP_DEBUG">enable WP_DEBUG</a> in your wp-config.php). 128 1. If the issue is related to a specific email, the full email, including headers. Feel free to replace any personal information with dummy text (such as "sender@example.com"). <a href="https://support.google.com/groups/answer/75960?hl=en">This link</a> has instructions for viewing full message headers in Gmail, Outlook and Yahoo. 129 130 46 131 == Changelog == 132 133 = 1.0.4 = 134 * Added screenshots, expanded Readme and contextual help. 135 * Added support for user-included gallery shortcode (allows use of WP's gallery options). 136 * Added warning when checking email before changed settings have been saved. 137 * Code style fixes as per http://gsoc.trac.wordpress.org/ticket/377 138 * Fixed https://github.com/codebykat/wp-post-by-email/issues/3 47 139 48 140 = 1.0.3 =
Note: See TracChangeset
for help on using the changeset viewer.