diff --git a/src/Handler.php b/src/Handler.php
index 3092d40bf3bfe5b8222e2886f271db859e9a691a..7ab602ebd090029c0769646f47075b8a4117be8b 100644
--- a/src/Handler.php
+++ b/src/Handler.php
@@ -143,7 +143,7 @@ class Handler extends BaseHandler {
         'allowinsecure' => $this->env->receiveGlobal('MAILPIT_ALLOW_INSECURE', 'MailPit allow insecure'),
         'auth' => $this->env->receiveGlobal('MAILPIT_AUTH', 'MailPit Auth (none|plain|login|cram-md5)'),
         'secret' => $this->env->receiveGlobal('MAILPIT_SECRET', 'MailPit Secret'),
-        'returnpath' => $this->env->receiveGlobal('MAILPIT_RETURNPATH', 'MailPit Bound Address'),
+        'returnpath' => $this->env->receiveGlobal('MAILPIT_RETURNPATH', 'MailPit Bounce Address'),
         'recipientallowlist' => $this->env->receiveGlobal('MAILPIT_RECIPIENT_ALLOW_LIST', 'MailPit Regex for allowed recipients'),
       ],
       'varnish' => [
diff --git a/templates/docker-compose.yml.twig b/templates/docker-compose.yml.twig
index dc267a7ab367cc6da30c37018219124ef1cab070..2da676a2a3fdbc0d72cbf4cb2afc22ed83daaa3b 100644
--- a/templates/docker-compose.yml.twig
+++ b/templates/docker-compose.yml.twig
@@ -323,7 +323,6 @@ services:
       traefik.http.routers.mailhog-{{ projectname }}.tls: 'true'
       traefik.http.routers.mailhog-{{ projectname }}.tls.certresolver: lakedrops
 {% endif %}
-{% endif %}
 {% elseif mailpit.enable and (not drupal.live|default(0) or staging) %}
 
   mailpit:
diff --git a/templates/mailpitout.yml.twig b/templates/mailpitout.yml.twig
index 1c111b8b5d3cc005ec2c0f5b37576af3c799f0c4..4fa8b29616b805562b98dfee919fb0832ddd39f3 100644
--- a/templates/mailpitout.yml.twig
+++ b/templates/mailpitout.yml.twig
@@ -1,6 +1,6 @@
 host: '{{ mailpit.host }}'
 {% if mailpit.port != '' %}
-port: '{{ mailpit.port }}'
+port: {{ mailpit.port }}
 {% endif %}
 {% if mailpit.username != '' %}
 username: '{{ mailpit.username }}'
diff --git a/templates/settings.docker.php.twig b/templates/settings.docker.php.twig
index 3cb6b49cf1deb0b06e6ba77e92d161856ce6d40d..709248a48c6c3780c35a746fe5b7d4beca3b0e40 100644
--- a/templates/settings.docker.php.twig
+++ b/templates/settings.docker.php.twig
@@ -33,10 +33,10 @@ $databases = array(
     ),
   ),
 );
-{% if not drupal.live|default(0) or mailhog.enable %}
+{% if not drupal.live|default(0) or mailhog.enable or mailpit.enable %}
 $config['system.mail']['interface']['default'] = 'SMTPMailSystem';
 $config['smtp.settings']['smtp_on'] = TRUE;
-$config['smtp.settings']['smtp_host'] = 'mailhog';
+$config['smtp.settings']['smtp_host'] = '{% if mailhog.enable %}mailhog{% else %}mailpit{% endif %}';
 $config['smtp.settings']['smtp_hostbackup'] = '';
 $config['smtp.settings']['smtp_port'] = '1025';
 $config['smtp.settings']['smtp_protocol'] = 'standard';
@@ -65,7 +65,7 @@ $databases = array(
 );
 
 $base_url = '{{ projectprotocol }}://{{ projectdomain }}{{ projectport }}';
-$conf['smtp_host'] = 'mailhog';
+$conf['smtp_host'] = '{% if mailhog.enable %}mailhog{% else %}mailpit{% endif %}';
 $conf['smtp_hostbackup'] = '';
 $conf['smtp_port'] = '1025';
 $conf['smtp_protocol'] = 'standard';