snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Update mailer configurations for Symfony mailer

Open jerm opened this issue 5 months ago • 1 comments

Newer Laravel uses Symfony mailer instead of SwiftMailer, and that means that some configs and functionality have changed

In this change, we update config/mail.php with the new config layout and name/functionality changes

of note:

  • New configuration layout supporting lots of new/different mailers
  • MAIL_DRIVER has become MAIL_MAILER, though we'll support both
  • MAIL_ENCRYPTION is mostly useless, and we mark it as such -- symfony mailer detects which type of encryption to use automagically.
  • MAIL_TLS_VERIFY_PEER is now available in case of self-signed certificates on the mail server, of if you want to access it by a different name, or by IP

Accordingly, we also update the .env examples, docker configs, and the .env builder in the snipeit.sh installation script with the above changes

jerm avatar Feb 29 '24 07:02 jerm

PR Summary

This Pull Request primarily makes adjustments to the email configuration settings across different configuration files. These changes are important for ensuring the effective delivery and security of emails sent by the application.

  • Updated Email Settings across Several Configuration Files In numerous system-wide configuration files (.env, app.json, docker, and phpunit.xml), the old MAIL_DRIVER setting has been replaced by the more current MAIL_MAILER. This update aligns the software more closely with recent standards, ensuring compatibility and efficient email operations.

  • Implemented Change in Mail Encryption The MAIL_ENCRYPTION term has been replaced with MAIL_TLS_VERIFY_PEER in several files such as .env.docker, .env.example, app.json, docker/docker-secrets.env, docker/docker.env, and snipeit.sh. This is an upgrade just like the previous point and provides a stronger security standard for the email system, particularly important for sensitive communication.

  • Refactored the Mail Configuration File (config/mail.php) The old MAIL_DRIVER setting has been removed from config/mail.php and the mailers area of the file is updated with the new MAIL_MAILER and its related elements. This shift makes the mail service more efficient and consistent with the rest of the system's settings.

Please note, these changes are in the backend of the system and won’t affect your day-to-day experience while using the application. However, they help ensure that the app delivers messages more reliably and securely.

what-the-diff[bot] avatar Feb 29 '24 07:02 what-the-diff[bot]