ddev: Mailhog doesn't work with TYPO3 ddev configuration

Describe the bug TYPO3 in its basic configuration cannot send test mails due to an error in the sendmail command: /usr/local/bin/mailhog sendmail test@example.org --smtp-addr 127.0.0.1:1025

To Reproduce Steps to reproduce the behavior:

  1. Setup TYPO3
  2. Go to Install Tool (/typo3/install.php)
  3. Go to module Environment
  4. Go to Test Mail Setup
  5. Send a test mail
  6. Error Something went wrong, in the TYPO3 log Uncaught TYPO3 Exception: Unsupported sendmail command flags [/usr/local/bin/mailhog sendmail test@example.org --smtp-addr 127.0.0.1:1025]. Must be one of "-bs" or "-t" but can include additional flags.

Expected behavior It should send an email.

Screenshots If applicable, add screenshots to help explain your problem.

Version and configuration information (please complete the following information):

  • Host computer OS and Version: macOS High Sierra
  • Docker version information (use docker version) and insert it here.
Client:
 Version:      18.03.1-ce
 API version:  1.37
 Go version:   go1.9.5
 Git commit:   9ee9f40
 Built:        Thu Apr 26 07:13:02 2018
 OS/Arch:      darwin/amd64
 Experimental: false
 Orchestrator: swarm

Server:
 Engine:
  Version:      18.03.1-ce
  API version:  1.37 (minimum version 1.12)
  Go version:   go1.9.5
  Git commit:   9ee9f40
  Built:        Thu Apr 26 07:22:38 2018
  OS/Arch:      linux/amd64
  Experimental: true
  • ddev version information (use ddev version)
commit	v0.19.0                         
domain	ddev.local                      
cli   	v0.19.0                         
web   	drud/nginx-php-fpm-local:v0.19.0
db    	drud/mariadb-local:v0.19.0      
dba   	drud/phpmyadmin:v0.19.0         
router	drud/ddev-router:v0.19.0
  • config.yaml contents for the misbehaving project
APIVersion: v0.19.0
name: typo3-9
type: typo3
docroot: public
php_version: "7.2"
router_http_port: "80"
router_https_port: "443"
xdebug_enabled: false
additional_hostnames: []
provider: default
  • Do you have any custom configuration (nginx, php, mysql) in the .ddev folder? If so, have you tried without them?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 19 (13 by maintainers)

Commits related to this issue

Most upvoted comments

In my fresh installed TYPO3 v9 Installation I have to set this 2 settings in “Admin Tools” -> “Settings” -> “Configure Installation-Wide Options” to get the Testmail working: [MAIL][transport] = smtp [MAIL][transport_smtp_server] = localhost:1025

@DavidBruchmann talking about the Topic in the typo3 slack channel, now i know the config files have moved and renamed, reading the doc some Minutes before 😄

And my DDEV Container was 1.21.1 but there was a Release 3 days Ago with TYPO3 v12 Support

So i will try it with the latest release again

Thanks and many thanks to @rfay also for this great solution

talked to @gilbertsoft! We will wait until the TYPO3 v12 will be released as LTS stable version. There might come some more changes in the TYPO3 core.

Workaround for using TYPO3 12.x in DDEV: ddev exec mv typo3conf/AdditionalConfiguration.php typo3conf/system/additional.php

_I also add the link to the cause for the sendmail config “error”: https://github.com/symfony/mailer/blob/6.2/Transport/SendmailTransport.php#L57_

@rfay It was a single case and never ever had problems with it, so in general I can confirm that by default it’s working.

I just had this issue with TYPO3 v12. For some reason the config values from AdditionalConfiguration.php have been ignored. After adding the values to LocalConfiguration.php everything worked fine. The issue is not that the AdditionalConfiguration.php has been ignored (that might be another issue), but just to check if this hint might be relevant for some reason, i.e. that the file is in the wrong folder.