Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/299.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何在pear邮件中设置auth方法_Php_Pear - Fatal编程技术网

Php 如何在pear邮件中设置auth方法

Php 如何在pear邮件中设置auth方法,php,pear,Php,Pear,我只需要帮助设置pear邮件中的身份验证类型。这是我目前拥有的阵列。。auth设置为true,但我需要它为true并设置为LOGIN-method。有人能帮我解释一下这个的语法吗 $smtp = Mail::factory('smtp', array( 'host' => 'ssl://server.net', 'port' => '465', 'auth' => true, 'timeout' => 20,

我只需要帮助设置pear邮件中的身份验证类型。这是我目前拥有的阵列。。auth设置为true,但我需要它为true并设置为LOGIN-method。有人能帮我解释一下这个的语法吗

$smtp = Mail::factory('smtp', array(
        'host' => 'ssl://server.net',
        'port' => '465',
        'auth' => true,
        'timeout' => 20,
        'username' => 'theusername',
        'password' => 'thepassword'
    ));

根据需要,您应该将
auth
字段设置为
“LOGIN”
,而不仅仅是
true

谢谢!我认为这是应该的,但这样做并不能解决我的身份验证问题,所以我怀疑自己。