<p>The <a href="https://craftcms.com/docs/config-settings#testToEmailAddress" rel="nofollow">testToEmailAddress</a> config setting which</p>

<blockquote>
  <p>Configures Craft to send all system emails to a single email address (or multiple email addresses), for testing purposes.</p>
</blockquote>

<p>sounds like the one you are looking for.</p>

CC BY-SA 3.0
2016-06-23T16:36:11.777Z
2016-06-23T16:36:11.777Z
Marion Newlevant
<p><a href="https://craftcms.stackexchange.com/a/15636/57">Marion's answer</a> is a workaround for Craft 2, but this has been officially addressed in the upcoming Craft 3:  <a href="https://github.com/craftcms/cms/issues/840" rel="nofollow noreferrer">https://github.com/craftcms/cms/issues/840</a></p>

CC BY-SA 3.0
2017-07-11T13:34:52.930Z
This feedback 404s. Is this possible yet in the config? It would be a great feature.
ianp
CC BY-SA 3.0
2017-07-12T00:10:25.737Z
Updated answer.
Brad Bell
CC BY-SA 3.0
2016-06-23T17:27:33.103Z
2017-07-12T00:10:20.227Z
2017-07-12T00:10:20.227Z
Brad Bell
<p>Shameless plug: We've written a plugin that automatically updates your email settings depending on your environment. It's not free, but it is cheap :-) Please <a href="http://red-robot.co.uk/our-work/email-settings-craft-cms-plug-in" rel="nofollow noreferrer">check out</a> the page on our website for more information. </p>

CC BY-SA 3.0
2017-08-02T12:51:52.090Z
2017-08-02T12:51:52.090Z
Gaz
<p>Is there a way to set the system email address and sender name from within the config file?</p>

<p>This would be useful when using multi environment configurations. For instance, during development or on my staging server I wish emails to be sent to me (the developer). While for production they would go to the site owner.</p>

<p>I can see the values in serialised data within the database but was hoping I could override them within the config file. I've tried the  keys "emailAddress" and "senderName" to no avail.</p>

<config><emails><configuration>
Setting system email address and sender name in multi config
# Setting system email address and sender name in multi config

(Asked by: username_0 on 2016-06-23)

Is there a way to set the system email address and sender name from within the config file?

This would be useful when using multi environment configurations. For instance, during development or on my staging server I wish emails to be sent to me (the developer). While for production they would go to the site owner.

I can see the values in serialised data within the database but was hoping I could override them within the config file. I've tried the keys "emailAddress" and "senderName" to no avail.

**Tags:** config, emails, configuration


---

## 3 answers

### Answer by username_1 on 2016-06-23. Score: 3 | Accepted answer

The [testToEmailAddress](https://craftcms.com/docs/config-settings#testToEmailAddress) config setting which

> Configures Craft to send all system emails to a single email address (or multiple email addresses), for testing purposes.

sounds like the one you are looking for.


---

### Answer by username_2 on 2016-06-23. Score: 3

[Marion's answer](https://craftcms.stackexchange.com/a/15636/57) is a workaround for Craft 2, but this has been officially addressed in the upcoming Craft 3: <https://github.com/craftcms/cms/issues/840>

> **Comments:**
> **username_3**: This feedback 404s. Is this possible yet in the config? It would be a great feature.  
> **username_2**: Updated answer.  

---

### Answer by username_4 on 2017-08-02. Score: 1

Shameless plug: We've written a plugin that automatically updates your email settings depending on your environment. It's not free, but it is cheap :-) Please [check out](http://red-robot.co.uk/our-work/email-settings-craft-cms-plug-in) the page on our website for more information.


---

