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

Update mailer configurations for Symfony mailer #14349

Open
wants to merge 1 commit into
base: snipeit_v7_laravel10
Choose a base branch
from

Conversation

jerm
Copy link
Collaborator

@jerm jerm commented Feb 29, 2024

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

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
Copy link

what-the-diff bot commented Feb 29, 2024

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.

Copy link
Collaborator

@uberbrady uberbrady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great - excellent sleuthing! Thank you for working all of this stuff out - Laravel changes to env vars always make these upgrades so much more painful than they really need to be. Thank you for figuring this one out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants