View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0020286 | phpList 3 application | public | 06-11-20 10:20 | 23-12-20 11:59 | |
Reporter | duncanc | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | resolved | Resolution | fixed | ||
Product Version | 3.5.8-RC1 | ||||
Target Version | 3.5.8 | ||||
Summary | 0020286: Failure when using PHPMailer 6 with custom PHPMailer 5 | ||||
Description | This applies to 3.5.8-RC1, which doesn't appear in the Product Version drop-down The change to make PHPMailer 6 the default instead of PHPMailer 5 causes a problem when someone is using a custom or old version of PHPMailer 5 by specifying a value for PHPMAILER_PATH. Because that path will now be interpreted as a path to a custom version of PHPMailer 6, which is a different format, php will fail when trying to autoload PHPMailer. To avoid this problem in the release notes explain that they have to select to continue using PHPMailer 5 by adding this to config.php define('USE_PHPMAILER6', false); or remove the define of PHPMAILER_PATH to now use PHPMailer 6. or make a code change to avoid the problem. Possibly use a different define name for PHPMailer 6, e.g. PHPMAILER6_PATH. | ||||
Tags | No tags attached. | ||||
|
Thanks for reporting this. I can add an additional note for this in the Release Notes. Do you think you can submit a PR with a fix prior to the final release of 3.5.8? Regarding the product version, I updated both the Product Version and the Target Version. |
|
For security reasons we should encourage upgrading to PHPMailer6. So, I think we should mention this in the release notes, but also try to detect it when the PHPMAILER_PATH is used, and then display a message when it is an old version, with a link to the release notes. What do you think? |
|
I updated the release notes on the Discourse by warning people on the problem they might encounter because of the default use of PHPMailer6. @michiel I agree with the alert message. |
|
I have created a PR with a small change to validate the PHPMAILER_PATH value which should avoid the problem of php failing, even when people do not read the release notes. https://github.com/phpList/phplist3/pull/709 For the warning, should it be when someone is using PHPMailer 5 at all, or only when they are also using a custom version? |
|
I checked that PR and this will sort it out for now. If they are using their own PHPMailer 5, it will change to using to our version 6, a it now checks that the path is a directory. If that causes issues, they can check the release notes and find out what's going on. I think we can put the warning in independently, and disconnect it from this issue. The warning should be about version 5 I guess, but eventually that's no longer our responsibility. @mariana it'll be good to merge this PR for the next release. |
|
Yes that's right, I should have explained more clearly the approach. An alternative was to work-out from the PHPMAILER_PATH value which version of PHPMailer it applied to, but this change seemed a bit simpler. |
|
The second PR with the fix for this has been merged. |
|
This issue was resolved with https://github.com/phpList/phplist3/pull/709 |