| 开发者 | szepe.viktor |
|---|---|
| 更新时间 | 2015年12月28日 21:06 |
| 捐献地址: | 去捐款 |
| PHP版本: | 4.0 及以上 |
| WordPress版本: | 4.4 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
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:
smtpTLS:// - the default port is 587.smtps:// - the default port is 465.smtp:// - the default port is 25. This is not recommended for non-local servers.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
smtp_uri option on uninstallation (I hope you won't uninstall it)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:Gmail_password@smtp.gmail.com
Sendgrid example
smtpTLS://CREDENTIAL-USERNAME:PASSWORD@smtp.sendgrid.net
Mandrill example
smtpTLS://REGISTERED%40EMAIL:API-KEY@smtp.mandrillapp.com
Unauthenticated SMTP server on a custom port
smtpTLS://mail.server.net:2525
Development goes on on GitHub.
smtp-uri.php to the /wp-content/plugins/svn-updater/ directoryYou may uncomment debugging and automatic Bcc. ` // Turn on SMTP debugging $mail->SMTPDebug = 4; $mail->Debugoutput = 'error_log'; // Bcc admin email $mail->addBCC( get_bloginfo( 'admin_email' ) ); `
admin_email/admin_email@?debug?debug=4, possible values: 0,1,2,4smtp:// (PHP 5.6 requires valid certificate)