tacruc / gpgmailer

Send encryped emails to registered users
GNU Affero General Public License v3.0
15 stars 4 forks source link

Call to undefined method on Nextcloud 26 with php 8.1 #26

Open Luticus opened 1 year ago

Luticus commented 1 year ago

Call to undefined method OC\Mail\Message::getSwiftMessage() in file '/var/www/nextcloud/apps/gpgmailer/lib/Service/GpgMessageConvertService.php' line 94"

"Exception":"Exception","Message":"Call to undefined method OC\Mail\Message::getSwiftMessage() in file '/var/www/nextcloud/apps/gpgmailer/lib/Service/GpgMessageConvertService.php' line 94","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->"

I should also mention that I'm using Nextcloud 26.

rg-ac commented 1 year ago

Same Error here: Ubuntu 22.04.2 (64bit), Nextcloud 26.0.3, Apache2, PHP 8.1, PGP Mailer App 0.0.4

zkyworks commented 10 months ago

Same error here. It appears Swiftmailer has been deprecated; if this function were rewritten using Symfony Mailer, it might fix this bug: https://symfony.com/blog/the-end-of-swiftmailer

tacruc commented 8 months ago

Thats probably it. One could try if it is sufficient to replace

getSwiftMessage -> getSymfonyEmail

setSwiftMessage -> setSymfonyEmail