Closed moudsen closed 1 year ago
Initial thoughts using Mailer is a required refactoring of the mailGraph code to adopt Mailer. The current as-is code cannot be migrated by replacing the library only.
This will require a bit more time and testing than expected hence taking a crack at it a a later moment.
Deprecation messages are appearing while debug logging for mailGraph is enabled. These messages can be safely discarded as notice and will disappear with the replacement of SwiftMailer by Mailer.
Deprecation messages are now also thrown from PHP 8.x perspective. Replacement eminent - will update on short notice to complete the deprecation lead updates required to get to a clean state again.
Found some severe restrictions in using Symfony Mailer such as attaching/defining an attachment from memory. Considering PHPMailer as a replacement.
Runs perfectly with PHPMailer. Abandoning Symfony from here.
composer require phpmailer/phpmailer
Comments:
Next steps:
Considering abandoning the plain text output variant and use HTML only.
Template update required for html: adding "cid:" for every graph source (Swift did this for me, PHPMailer does not. Considering to tackle otherwise in the code instead of the template.
Found a solution - no template change required :-). Content-id marker is now added after processing of the image attachment to the message.
Depending on AutoTLS now - removing encryption configuration from config file.
Error catching complete
Testing and final adjustments completed. Considering to release v.212 after final code review.
Found different curl behavior with PHP 8.2: cookies are automically removed after a session. Adjusted coding accordingly. Final testing rounds on Zabbix 5.4 and Zabbix 6.0 LTS in progress.
Testing completed successfully. Committed as v2.12
The swiftmailer/swiftmailer repository under composer has been abandoned. New library suggested is symphone/mailer.