You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Commerce Settings > Emails section, only the Status Email Address and From Name can currently be set as environment variables.
On my staging environment, I need the BCC’d Recipient to differ from production. However, since the /admin/commerce/settings/emails/primary/1 section is not accessible when CRAFT_ALLOW_ADMIN_CHANGES=false (which is the expected setting for staging), I cannot modify this value.
Why does Craft Commerce not allow additional email options, such as BCC’d Recipient, Email Subject, and Reply-To, to be defined as environment variables? Is this an oversight?
Is there an alternative solution, such as defining these settings via config/commerce.php? If yes, what are the exact keys to use? The BCC’d Recipient option, for instance, is not documented here: Commerce 5.x Configuration
In my case, being able to set BCC’d Recipient as an environment variable is crucial. However, having the ability to set Email Subject and Reply-To in the same way would be highly beneficial.
Steps to reproduce
Set up a staging environment with CRAFT_ALLOW_ADMIN_CHANGES=false.
Attempt to configure the BCC’d Recipient for Commerce Emails to differ from production.
Notice that this value cannot be set via environment variables or the config/commerce.php file.
Expected behavior
The BCC’d Recipient, Email Subject, and Reply-To fields should support the use of environment variables for easier configuration across environments (staging, production, etc.).
Actual behavior
These fields cannot be defined as environment variables, and there is no documented alternative to set them via the configuration file. This limits flexibility, especially in non-production environments where admin changes are restricted.
Craft CMS version
5.5.3
Craft Commerce version
5.2.6
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered:
What happened?
Description
In the Commerce Settings > Emails section, only the Status Email Address and From Name can currently be set as environment variables.
On my staging environment, I need the BCC’d Recipient to differ from production. However, since the
/admin/commerce/settings/emails/primary/1
section is not accessible whenCRAFT_ALLOW_ADMIN_CHANGES=false
(which is the expected setting for staging), I cannot modify this value.Why does Craft Commerce not allow additional email options, such as BCC’d Recipient, Email Subject, and Reply-To, to be defined as environment variables? Is this an oversight?
Is there an alternative solution, such as defining these settings via
config/commerce.php
? If yes, what are the exact keys to use? The BCC’d Recipient option, for instance, is not documented here: Commerce 5.x ConfigurationIn my case, being able to set BCC’d Recipient as an environment variable is crucial. However, having the ability to set Email Subject and Reply-To in the same way would be highly beneficial.
Steps to reproduce
CRAFT_ALLOW_ADMIN_CHANGES=false
.config/commerce.php
file.Expected behavior
The BCC’d Recipient, Email Subject, and Reply-To fields should support the use of environment variables for easier configuration across environments (staging, production, etc.).
Actual behavior
These fields cannot be defined as environment variables, and there is no documented alternative to set them via the configuration file. This limits flexibility, especially in non-production environments where admin changes are restricted.
Craft CMS version
5.5.3
Craft Commerce version
5.2.6
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: