
內容簡介
使用SMTP協定傳輸電子郵件可以確保穩定運作。
設置SMTP非常容易。您可以在WordPress管理員菜單的“選項/常規”底部找到此插件的設置。
您應該從您的ISP、主機提供商、網站管理員、電子郵件提供商等獲取您的SMTP設置。
使用每個選項SMTP URI的形式都像這樣:
smtpTLS://USERNAME:PASSWORD@HOST:PORT
因此,加密類型和://和用戶名和:和密碼和@和郵件服務器名稱以及:和端口號,除加密類型和郵件服務器(主機名)以外,其他選項都是可選的。
SMTP加密類型如下:
對於加密連接(提交端口上的STARTTLS),請以smtpTLS://開始您的SMTP URI - 默認端口為587。
對於完全SSL加密連接(SMTPS),請以smtps://開始 - 默認端口為465。
對於未加密連接(純文本SMTP),請以smtp://開始 - 默認端口為25。這不建議用於非本地服務器。
警告!使用URL編碼字符串。
您可以在wp-config.php中定義您的SMTP URI:
define( 'SMTP_URI', 'smtpTLS://USERNAME:PASSWORD@HOST:PORT' );
要設置From:名稱和From:地址,請使用WP Mail From II插件。
SMTP錯誤日誌記錄
SMTP通訊錯誤被記錄在PHP error.log中,如果Sucuri Scanner插件可用,則會發送到Sucuri並可以在其警報日誌面板中查看。
添加自動Bcc:地址
可以添加SMTP URI的路徑來設置自動Bcc:地址:/admin_email。
SMTP調試
向SMTP URI添加查詢字符串:?debug。
可以通過添加值來設置調試級別:?debug = 4,可能的值為0,1,2,4。
待辦事項
跳過新聞通訊的選項:ALO Newsletter、Newsletter、Mailpoet。
安裝和設置此插件的視頻。
在卸載時刪除smtp_uri選項(希望您不會卸載它)
使用示例
端口25上的未驗證本地SMTP服務器
smtp://localhost
提交端口上未驗證的本地SMTP服務器
smtpTLS://localhost
驗證的localhost端口25連接
smtp://john.doe:Secretpwd1@localhost
在用戶名中的“@”符號中,以Gmail為例
smtps://your.address%40gmail.com:[email protected]
Sendgrid示例
smtpTLS://CREDENTIAL-USERNAME:[email protected]
Mandrill示例
smtpTLS://REGISTERED%40EMAIL:[email protected]
自定義端口的未驗證SMTP服務器
smtpTLS://mail.server.net:2525
此插件的開發在GitHub上進行。
外掛標籤
開發者團隊
原文外掛簡介
Using SMTP protocol to transfer emails ensures solid operations.
It is very easy to set up SMTP. You can find the settings for this plugin at the bottom of WordPress admin menu Options / General.
You should get your SMTP settings from your ISP, hosting provider, webmaster, email provider etc.
Using every option SMTP URI formally looks like this:
smtpTLS://USERNAME:PASSWORD@HOST:PORT
Thus encryption type and :// and user name and : and password and @ and mail server name and : and port number.
All except encryption type and mail server (host name) are optional.
SMTP encryption types are as follows:
For encrypted connection (STARTTLS on submission port) start your SMTP URI with smtpTLS:// – the default port is 587.
For fully SSL encrypted connection (SMTPS) start it with smtps:// – the default port is 465.
For unencrypted connection (plain SMTP) start it with smtp:// – the default port is 25. This is not recommended for non-local servers.
WARNING! Use URL-encoded strings.
You can find the settings for this plugin at the bottom of WordPress admin Options / General.
You may define your SMTP URI also in wp-config.php:
define( 'SMTP_URI', 'smtpTLS://USERNAME:PASSWORD@HOST:PORT' );
To set From: name and From: address use
WP Mail From II plugin.
SMTP error logging
SMTP communication errors are logged in PHP error.log and – if
Sucuri Scanner
plugin is available – are sent to Sucuri and can be viewed in its Alert Logs panel.
Adding automatic Bcc: address
An automatic Bcc: address can be set by adding path to SMTP URI: /admin_email.
SMTP debugging
Add query string to SMTP URI: ?debug.
Debug level can be set by adding a value: ?debug=4, possible values: 0,1,2,4
TODO
Option to skip newsletters: ALO Newsletter, Newsletter, Mailpoet.
Video on installing and setting up this plugin.
Remove smtp_uri option on uninstallation (I hope you won’t uninstall it)
Usage examples
Unauthenticated local SMTP server on port 25
smtp://localhost
Unauthenticated local SMTP server on submission port
smtpTLS://localhost
Authenticated connection to localhost on port 25
smtp://john.doe:Secretpwd1@localhost
“@” sign in the username, a Gmail example
smtps://your.address%40gmail.com:[email protected]
Sendgrid example
smtpTLS://CREDENTIAL-USERNAME:[email protected]
Mandrill example
smtpTLS://REGISTERED%40EMAIL:[email protected]
Unauthenticated SMTP server on a custom port
smtpTLS://mail.server.net:2525
Development goes on on GitHub.
