dnadesign/silverstripe-subsites-default-emails

Allows the default 'from' email to be set on a per subsite basis

2.0.0 2024-01-24 22:50 UTC

This package is auto-updated.

Last update: 2024-10-25 00:58:48 UTC


README

This module adds a DefaultFromEmail field to the Subsite DataObject which can be used to set the default "From" address for emails sent from each subsite.

The main site will still use the config value that has been set in you application config:

SilverStripe\Control\Email\Email: admin_email: no-reply@mysite.nz

If a subsite does not have a value set for DefaultFromEmail then the value of 'admin_email' will be used.

Note: this functionality does not affect any emails that have explicitly set the from address when sending an email, only emails that do not have any from address set.

Limititations

This functionality will not work via the command line or anywhere that Subsite::currentSubsite() returns null.