View Issue Details

IDProjectCategoryView StatusLast Update
0020286phpList 3 applicationEmailpublic11-11-20 10:25
Reporterduncanc Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status newResolutionopen 
Product Version3.5.8-RC1 
Target Version3.5.8 
Summary0020286: Failure when using PHPMailer 6 with custom PHPMailer 5
DescriptionThis 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.
TagsNo tags attached.

Activities

mariana

06-11-20 11:06

administrator   ~0063492

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.

michiel

06-11-20 11:07

administrator   ~0063493

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?

mariana

06-11-20 14:30

administrator   ~0063501

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.

duncanc

08-11-20 11:13

updater   ~0063506

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?

michiel

09-11-20 09:26

administrator   ~0063507

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.

duncanc

09-11-20 11:48

updater   ~0063508

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.

mariana

11-11-20 10:25

administrator   ~0063521

The second PR with the fix for this has been merged.