Configure Email Sender Addresses

This page provides an overview of the email messages sent internally by the Concrete CMS core and how to change their sender addresses. These emails are divided into the following groups in order to help you better understand how to change their sender addresses and which settings affect to which groups:

  • Group A: Emails that use the global default sender address
  • Group B: Emails that allow defining the sender address individually for each message
  • Group C: Emails that allow defining the sender address through Concrete admin UI

Each of these groups are introduced below and all the settings related to each group are shown under each group.

These settings can be configured through the concrete.php configuration file that should be located under your site's application/config directory. Please note that this file does not exist by default and you will need to create it in order to define any of these configurations. Each group explanation below provides an example of a configuration file that touches these settings.

Please note that another configuration file named concrete.php might already exist under application/config/generated_overrides. This file should not be edited! Always do these edits in the configuration files located directly under the application/config directory.

Group A: Emails that use the global default sender address

The following emails sent by Concrete allow you to define one "global" sender address that is used for all of the emails in this group:

  • Private message notifications (in case they are enabled for the user)
  • Conversations new message notifications (in case the participants have registered for the notifications)
  • New badge notifications for users (in case badges have been enabled and configured)

The setting names for the global sender email are:

  • Sender address: concrete.email.default.address
  • Sender name: concrete.email.default.name (can be empty)

An example configuration file (application/config/concrete.php) for this setting is given below:

<?php

return array(
    'email' => array(
        'default' => array(
            'address' => 'your@email.com',
            'name' => 'Your Site', // this can be left out
        ),
    ),
);

In case the system default sender address has not been defined in the configurations, the default sender address is concrete5-noreply@yoursite.com where the domain part is replaced with the active domain of the site when you are sending the email or with localhost in case the mails are being sent in an environment where the active domain is not available for the PHP proces (e.g. when running under the CLI interface).

Group B: Emails that allow defining the sender address individually for each message

The following emails sent by Concrete allow you to define the sender address individually for each message:

  • Form block submit notifications (in case the block has been configured to send these)
  • User registration email validation email (in case email validation is enabled)
  • Forgot password email

The setting names used for these emails are defined below:

  • Form block submit notifications: concrete.email.form_block.address
  • User registration email validation email:
    • Sender address: concrete.email.validate_registration.address
    • Sender name: concrete.email.validate_registration.name (can be empty)
  • Forgot password email: concrete.email.forgot_password.address

An example configuration file (application/config/concrete.php) for these settings is given below:

<?php

return array(
    'email' => array(
        'form_block' => array(
            'address' => 'your@email.com',
        ),
        'validate_registration' => array(
            'address' => 'your@email.com',
            'name' => 'Site Email Validation', // this can be left out
        ),
        'forgot_password' => array(
            'address' => 'your@email.com',
        ),
    ),
);

For these addresses, the system's super user (the first user in the system) email is being used as the default sender address in case these settings have not been defined through the configurations. Note that the global sender address configuration (concrete.email.default.address) does not affect the default sender address of these emails in any way.

Group C: Emails that allow defining the sender address through Concrete admin UI

User registration notifications

Concrete allows you to define the user registration admin notification email address through the admin UI. In case this email has been defined, the same address where the email is being sent to is also used as the sender address in that email.

You can find this setting under the Concrete dashboard from System & Settings > Login & Registration > Public Registration. More on these settings can be read from the editors documentation.

Wrapping it all together

Example configuration file (application/config/concrete.php) that changes all of the configuration values presented above is given below.

<?php

return array(
    'email' => array(
        // The system default sender (Group A)
        'default' => array(
            'address' => 'your@email.com',
            'name' => 'Your Site', // this can be left out
        ),
        // The individual senders (Group B)
        // Form block:
        'form_block' => array(
            'address' => 'your@email.com',
        ),
        // User registration email validation messages
        'validate_registration' => array(
            'address' => 'your@email.com',
            'name' => 'Site Email Validation', // this can be left out
        ),
        // Forgot password messages
        'forgot_password' => array(
            'address' => 'your@email.com',
        ),
    ),
);