[WordPress] 外掛分享: Post By Email

首頁外掛目錄 › Post By Email
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
200+
安裝啟用
★★★★
4.2/5 分(16 則評價)
4558 天前
最後更新
問題解決
WordPress 3.6+ v1.0.4b 上架:2009-08-27

內容簡介

警告:此外掛目前處於測試版!使用風險自負,如有任何錯誤,請在 WordPress 支援論壇 或 Github 問題頁面 上回報。

所有發送至已設定電子郵件地址的新訊息都將會張貼到部落格上。此外掛取代了不久前存在於 WordPress 核心的功能。

當電子郵件成功張貼到部落格後,它可以被標記為已讀(僅限 IMAP 伺服器)或從郵箱刪除。

項目更新可以在 WordPress 核心部落格上的發文 上找到。

功能

支援帶或不帶 SSL 的 IMAP 或 POP3 伺服器
選配 PIN 碼驗證可防止電子郵件偽造
使用 WordPress 內建的角色管理哪些使用者能夠張貼
透過在電子郵件中包含 shortcode,設定分類、標籤和自訂分類法
電子郵件附件會自動加入到文章的相片庫
來自未經授權的使用者的電子郵件可以設為待定或捨棄

文章作者和安全性

「寄件人」地址會與 WordPress 使用者資料庫中的使用者配對,以確定文章作者。如果作者沒有帳號或不允許發佈文章,則文章狀態將被設為「待定」。

預設情況下,任何擁有「作者」、「編輯」或「管理員」角色的使用者都可以發佈文章。使用管理儀表板中的「使用者」選項來檢視和管理哪些使用者擁有此能力。有關 WordPress 權限系統的更多資訊請參閱 權限與角色。

Shortcode

預設情況下,透過電子郵件的文章將會放置在設定中的預設分類中。

您也可以透過在電子郵件中包含 shortcode,設定您文章的分類、標籤和自訂分類法。這些應該是以空格分隔的文字。將對 tags(非階層式分類法)使用 slug,而 category(階層式分類法)則採用 slug 或 ID。尚未存在的類別或標籤將被建立。例如:

分類:使用 slug 或 ID。
[category posted-by-email another-category]
[category 14]

標籤:使用 slug。
[tag cool-stuff]

自訂分類法:非階層式分類法採用 slug,階層式則使用 ID。
[custom-taxonomy-name thing1 thing2]
[another-custom-taxonomy 2 3 5]

附件

附加到電子郵件的任何檔案都會上傳到媒體庫並作為相片庫加入到文章中。您可以透過在電子郵件中加入相片庫 shortcode,指定相片庫選項或將其放置於文章中特定位置。如果不存在相片庫 shortcode,則會將其新增到文章末尾。

測試
自動測試

與 WordPress 核心一樣,此外掛包括使用 PHPUnit 編寫的自動單元測試。

執行單元測試:

如 手冊:自動化測試 中所述,設定 WordPress 測試資料庫庫。或使用 WP-CLI進行設定。
從外掛目錄中運行:WP_TESTS_DIR=/path/to/WordPress/test/install phpunit

手動測試

選擇一個郵件客戶端來發送電子郵件到您的設置中的電子郵件地址。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.4b) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Post By Email」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Warning: This plugin is currently in beta! Use at your own risk and please report any bugs, either on the WordPress Support forums or via the Github issues page.
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.
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.
Updates on the project can be found on the Make WordPress Core blog.
Features

Supports IMAP or POP3 servers, with or without SSL
Optional PIN-based authentication guards against email spoofing
Uses WordPress’s built-in roles to manage which users can post
Set categories, tags and custom taxonomies by including shortcodes in your email
Email attachments will automatically be added to the post’s gallery
Emails from unauthorized users can be either set as pending or discarded

Post Authors and Security
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”.
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 Codex: Roles and Capabilities.
Shortcodes
By default, emailed posts will be placed in the default category configured in the settings.
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:
Categories: Use either slugs or IDs.
[category posted-by-email another-category]
[category 14]
Tags: Use slugs.
[tag cool-stuff]
Custom Taxonomies: Use slugs for non-hierarchical taxonomies, and IDs for hierarchical.
[custom-taxonomy-name thing1 thing2]
[another-custom-taxonomy 2 3 5]
Attachments
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 gallery shortcode in your email. If no gallery shortcode exists, it will be added to the end of the post.
Testing
Automated Tests
Like WordPress Core, this plugin includes automated unit tests written in PHPUnit.
To run the unit tests:

Set up the WordPress testing library as described in Handbook: Automated Testing. You can also do this using WP-CLI.
From the plugin directory, run WP_TESTS_DIR=/path/to/WordPress/test/install phpunit

Manual Testing

Set up a test email address (services such as Gmail work great for this) and enable IMAP or POP3 access. (Refer to Installation for detailed instructions.)
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.
Enter those settings into the Post By Email settings and save them.
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.

Caveat: 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.
Reporting Bugs
Before reporting a bug, make sure you’ve updated the plugin to the latest version.
Then, provide as much of the following information as possible:

WordPress version (e.g. 3.6.x).
Plugin version (e.g. 1.0.4).
PHP version (e.g. 5.2.x or 5.3.x).
Your mailbox settings (URL, protocol, port and whether SSL is enabled; not your login and password).
Any error messages displayed (it might help to enable WP_DEBUG in your wp-config.php).
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 “[email protected]”). This link has instructions for viewing full message headers in Gmail, Outlook and Yahoo.

延伸相關外掛

文章
Filter
Mastodon