【问题标题】:How to set auth method in pear mail如何在梨邮件中设置身份验证方法
【发布时间】:2017-10-14 01:42:58
【问题描述】:

我只需要帮助设置梨邮件中的身份验证类型。这是我目前拥有的数组.. auth 设置为 true,但我需要它为 true 并设置为 LOGIN 方法。任何人都可以帮我解决这个问题的语法吗?

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

【问题讨论】:

    标签: php pear


    【解决方案1】:

    根据https://pear.php.net/manual/en/package.mail.mail.factory.php#9454,您应该将auth 字段设置为"LOGIN" 而不仅仅是true

    【讨论】:

    • 谢谢!以为应该是这样,但这样做并没有解决我遇到的身份验证问题,所以我怀疑自己。
    猜你喜欢
    • 2016-04-08
    • 1970-01-01
    • 1970-01-01
    • 2015-07-20
    • 2019-06-28
    • 1970-01-01
    • 2021-08-30
    • 1970-01-01
    相关资源
    最近更新 更多