Search code examples
typo3laragontypo3-12.x

How to setup TYPO3 12 on Laragon?


I've installed typo3 12 on Laragon.

Everything was going well until I try to login to TYPO3 for the first time and get this error:

Unsupported sendmail command flags "D:/laragon/bin/sendmail/sendmail.exe"; must be one of "-bs" or "-t" but can include additional flags.

What changes in which file do I need to get this working?


Solution

  • I have not much clue about hosting TYPO3 on Windows but you could try to change some mail settings in the TYPO3 Install tool. That should be available at yourdomain.tld/typo3/install.php.

    After the login to the install tool go to Settings => Configure Installation-Wide Options.

    There search for [MAIL][transport_sendmail_command] and check the values there.

    If this doesn't work out, you can go to [MAIL][transport] and set it to SMTP (to use any other SMTP server for the mail transport) or use mbox to disable sending mails.

    As Laragon seems to be a local development tool you can also check if there is a Mailhog implementation available.

    Update: If the install tool doesn't work either, you can make all changes manually in config/system/settings.php (TYPO3 v12) or typo3conf/LocalConfiguration.php (TYPO3 v11 and older). If the array key doesn't exist, just add it. You can see all default values in vendor/typo3/cms-core/Configuration/DefaultConfiguration.php.

    In case you want to have specific changes only in your development environment but not in production, create the file config/system/additional.php (or typo3conf/AdditionalConfiguration.php) and change the settings there, e.g. like this: $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport'] = 'mbox';

    Side note: I can only recommend DDEV as local development environment. It ships out the box with support for TYPO3 and has also Mailhog on board. Since it's Docker based, it comes with Apache or Nginx and helps you to set up a development environment that is very near to your later production environment.