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

phpmailer version 5.2.7 does not work with PHP 8 #523

Open
dunxd opened this issue Mar 25, 2023 · 3 comments
Open

phpmailer version 5.2.7 does not work with PHP 8 #523

dunxd opened this issue Mar 25, 2023 · 3 comments

Comments

@dunxd
Copy link

dunxd commented Mar 25, 2023

When using with PHP version 8, when trying to send a book via email errors are thrown - e.g.

PHP Fatal error:  Uncaught Error: Call to undefined function get_magic_quotes_runtime() in /cops/vendor/phpmailer/phpmailer/class.phpmailer.php:2714

This presumably isn't an issue with more recent versions of phpmailer, but likely the code calling phpmailer class needs to be changed according to phpmailer's upgrading doc.

@mikespub
Copy link

mikespub commented Mar 25, 2023

Switching to phpmailer 6.8.x is rather easy for COPS:

  • change composer.json to use phpmailer/phpmailer version ~6.8 instead of ~5.2
  • run "composer update --no-dev -o" if you have it available
  • change sendtomail.php to use PHPMailer\PHPMailer\PHPMailer

See mikespub-org@e1b7182 for relevant updates, or check out the unofficial version "1.3.2" at https://github.com/mikespub-org/seblucas-cops/releases with a few other updates

Note: there are only very basic tests for the mail functionality in COPS, so you may discover some other issues when you actually use it on PHP 8.x :-)

@dunxd
Copy link
Author

dunxd commented Apr 17, 2023

Thanks - the 1.3.2 version worked for me, although I wasn't able to get php mailer working (as you predicted) and it is a pain to troubleshoot, so I am putting the emailing of books to one side for now, and focus on tweaks to the interface and getting reading in the browser working.

Time to learn composer :-)

@mikespub
Copy link

Included in #522 and release 1.3.2 at https://github.com/mikespub-org/seblucas-cops

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