如何在 pear mail 中设置身份验证方法
How to set auth method in pear mail
我只需要帮助设置 pear 邮件中的身份验证类型。这是我目前拥有的数组。auth 设置为 true,但我需要它为 true 并设置为 LOGIN 方法。谁能帮我解决这个问题的语法?
$smtp = Mail::factory('smtp', array(
'host' => 'ssl://server.net',
'port' => '465',
'auth' => true,
'timeout' => 20,
'username' => 'theusername',
'password' => 'thepassword'
));
根据 https://pear.php.net/manual/en/package.mail.mail.factory.php#9454,您应该将 auth
字段设置为 "LOGIN"
而不仅仅是 true
。
我只需要帮助设置 pear 邮件中的身份验证类型。这是我目前拥有的数组。auth 设置为 true,但我需要它为 true 并设置为 LOGIN 方法。谁能帮我解决这个问题的语法?
$smtp = Mail::factory('smtp', array(
'host' => 'ssl://server.net',
'port' => '465',
'auth' => true,
'timeout' => 20,
'username' => 'theusername',
'password' => 'thepassword'
));
根据 https://pear.php.net/manual/en/package.mail.mail.factory.php#9454,您应该将 auth
字段设置为 "LOGIN"
而不仅仅是 true
。