diff --git a/src/Handler.php b/src/Handler.php
index 35a2ad91ef04f18590c176ecf4c9d88b46aa9800..1b5d4ecb6c5bc4a99a438fea770ce84a8913c035 100644
--- a/src/Handler.php
+++ b/src/Handler.php
@@ -90,6 +90,13 @@ class Handler extends BaseHandler {
         'type' => 'apache',
         'overwriteconfig' => FALSE,
       ],
+      'mailhog' => [
+        'host' => $this->env->receiveGlobal('MAILHOG_HOST', 'smtp.freesmtpservers.com'),
+        'port' => $this->env->receiveGlobal('MAILHOG_PORT', '25'),
+        'username' => $this->env->receiveGlobal('MAILHOG_USERNAME', ''),
+        'password' => $this->env->receiveGlobal('MAILHOG_PASSWORD', ''),
+        'mechanism' => $this->env->receiveGlobal('MAILHOG_MECHANISM', 'NONE'),
+      ],
       'varnish' => [
         'enable' => 0,
       ],
@@ -373,6 +380,9 @@ class Handler extends BaseHandler {
         'dest' => $projectRoot . '/apache',
         'condition' => $this->config->readValue(['webserver', 'overwriteconfig']),
       ],
+      'mhout.json' => [
+        'dest' => $projectRoot . '/tests',
+      ],
     ];
   }
 
diff --git a/templates/docker-compose.yml.twig b/templates/docker-compose.yml.twig
index a414180714cdbf348e6373ee20411885dbf19473..2678fe653cb9c14cff524fb4f21e954b4e08e90f 100644
--- a/templates/docker-compose.yml.twig
+++ b/templates/docker-compose.yml.twig
@@ -159,6 +159,11 @@ services:
 
   mailhog:
     image: 'mailhog/mailhog'
+    environment:
+      MH_OUTGOING_SMTP: /test/mhout.json
+    privileged: true
+    volumes:
+      - {{ projectroot }}/tests/mhout.json:/test/mhout.json
     labels:
       traefik.enable: 'true'
       traefik.network: {{ projectname }}
diff --git a/templates/mhout.json.twig b/templates/mhout.json.twig
new file mode 100644
index 0000000000000000000000000000000000000000..cee8e89893c7b65d162d32a2fbcdf4022aa16fbb
--- /dev/null
+++ b/templates/mhout.json.twig
@@ -0,0 +1,10 @@
+{
+  "MySMTP": {
+    "name": "MySMTP",
+    "host": "{{ mailhog.host }}",
+    "port": "{{ mailhog.port }}",
+    "username": "{{ mailhog.username }}",
+    "password": "{{ mailhog.password }}",
+    "mechanism": "{{ mailhog.mechanism }}"
+  }
+}