Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auth method doc is misleading #2732

Closed
lkppo opened this issue Jul 19, 2022 · 4 comments
Closed

auth method doc is misleading #2732

lkppo opened this issue Jul 19, 2022 · 4 comments

Comments

@lkppo
Copy link

lkppo commented Jul 19, 2022

Problem description

The docstring say in PHPMAILER.php:

    /**
     * SMTP auth type.
     * Options are CRAM-MD5, LOGIN, PLAIN, XOAUTH2, attempted in that order if not specified.
     *
     * @var string
     */
    public $AuthType = '';

This is ambiguous. I had previously understood that each authentication method is tried, in the order indicated, until one of them works. But after reading the code of SMTP->authenticate(), it is clear that among the methods announced by the server, the best one also supported by PHPMailer is chosen and tried only once.

I was tricked by a lying server which claims to support CRAM-MD5 but refuses authentication with this method.

Solution?

Can you correct the documentation to disambiguate it please?

@Synchro
Copy link
Member

Synchro commented Jul 19, 2022

How about "If not specified, the first one from that list that the server supports will be selected."?

@lkppo
Copy link
Author

lkppo commented Jul 19, 2022

I like it. Like that?

Options are CRAM-MD5, LOGIN, PLAIN, XOAUTH2. If not specified, the first one from that list that the server supports will be selected.

@Synchro
Copy link
Member

Synchro commented Jul 19, 2022

Done!

@lkppo
Copy link
Author

lkppo commented Jul 19, 2022

All right!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants