# config.php: How to override the Mailer settings in Shopware 5.2.7?

**URL:** <https://forum.shopware.com/t/config-php-how-to-override-the-mailer-settings-in-shopware-5-2-7/40111>\
**Category:** Programmierung\
**Created:** [26. September 2016 um 10:47 UTC](https://forum.shopware.com/t/config-php-how-to-override-the-mailer-settings-in-shopware-5-2-7/40111 "2016-09-26T10:47:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![metachris](https://avatars.discourse-cdn.com/v4/letter/m/ec9cab/32.png) [@metachris](https://forum.shopware.com/u/metachris)\
**Post date:** [26. September 2016 um 10:47 UTC](https://forum.shopware.com/t/config-php-how-to-override-the-mailer-settings-in-shopware-5-2-7/40111/1 "2016-09-26T10:47:46Z")

</div>

Hello,

I’m using Shopware 5.2.7 with Mailer Settings for [sendgrid.com](http://sendgrid.com), which works fine.

For local development I’d like to override the mail settings with config.php&nbsp;with settings&nbsp;[as seen here](http://community.shopware.com/config.php-Tweaks_detail_1801.html#File-Mailer_Config) for instance. But if I add a “mail” block with the following settings, it simply gets ignored by Shopware.

```
// Make sure no email is sent to the outside world
'mail' => [
    'type' => 'file',
    'path' => $this->DocPath().'mails'
],

```

How can I override the Mailer settings&nbsp;in Shopware 5.2.7?

Thanks a bunch!

Edit: Changed config\_local.php to config.php for easier understanding.&nbsp;

---

<div class="post-metadata">

**Author:** ![wontfix](https://avatars.discourse-cdn.com/v4/letter/w/b19c9b/32.png) [@wontfix](https://forum.shopware.com/u/wontfix)\
**Post date:** [26. September 2016 um 11:02 UTC](https://forum.shopware.com/t/config-php-how-to-override-the-mailer-settings-in-shopware-5-2-7/40111/2 "2016-09-26T11:02:11Z")

</div>

according to [shopware/Kernel.php at 5.2 · shopware/shopware · GitHub](https://github.com/shopware/shopware/blob/5.2/engine/Shopware/Kernel.php#L625) shopware reads `config.php` and `config_dev.php`. i could not find any mention of `config_local.php` in shopware source code.  
&nbsp;

---

<div class="post-metadata">

**Author:** ![metachris](https://avatars.discourse-cdn.com/v4/letter/m/ec9cab/32.png) [@metachris](https://forum.shopware.com/u/metachris)\
**Post date:** [26. September 2016 um 11:29 UTC](https://forum.shopware.com/t/config-php-how-to-override-the-mailer-settings-in-shopware-5-2-7/40111/3 "2016-09-26T11:29:41Z")

</div>

See&nbsp;[Configuring Multiple Shopware Environments](https://developers.shopware.com/blog/2016/01/26/configuring-multiple-shopware-environments/)

Setting an Apache environment variable like this

```
SetEnv SHOPWARE_ENV local

```

will override config.php with the content of&nbsp;config\_[ENVIRONMENT].php (in this example: config\_local.php)
