PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, August 30, 2022

[FIXED] How to set auth method in pear mail

 August 30, 2022     pear, php     No comments   

Issue

I just need help setting the auth type in pear mail. This is the array I have currently.. auth is set to true, but I need it to be true and set to LOGIN method. Can anyone help me out with the syntax for this?

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

Solution

According to https://pear.php.net/manual/en/package.mail.mail.factory.php#9454 you should set the auth field to "LOGIN" and not just true.



Answered By - Progman
Answer Checked By - Senaida (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing