Mediawiki/SMTP

来自OSSmedia
Brucekomike讨论 | 贡献2024年2月29日 (四) 10:17的版本 (创建页面,内容为“添加如下配置,记得username要与前面的password sender 一样<syntaxhighlight lang="php"> $wgSMTP = [ 'host' => 'mail.example.com', // could also be an IP address. Where the SMTP server is located. If using SSL or TLS, add the prefix "ssl://" or "tls://". 'IDHost' => 'example.com', // Generally this will be the domain name of your website (aka mywiki.org) 'localhost' => 'example.com', // Same as IDHost above; required by…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

添加如下配置,记得username要与前面的password sender 一样

$wgSMTP = [
    'host'      => 'mail.example.com', // could also be an IP address. Where the SMTP server is located. If using SSL or TLS, add the prefix "ssl://" or "tls://".
    'IDHost'    => 'example.com',      // Generally this will be the domain name of your website (aka mywiki.org)
    'localhost' => 'example.com',      // Same as IDHost above; required by some mail servers
    'port'      => 587,                // Port to use when connecting to the SMTP server
    'auth'      => true,               // Should we use SMTP authentication (true or false)
    'username'  => 'my_user_name',     // Username to use for SMTP authentication (if being used)
    'password'  => 'my_password'       // Password to use for SMTP authentication (if being used)
];