Cannot access email section of settings

Craft CMS Asked on December 30, 2021

I somehow can’t access the email section of settings;

Argument 1 passed to crafthelpersMailerHelper::createTransportAdapter() must be of the type string, null given, called in ___/vendor/craftcms/cms/src/controllers/SystemSettingsController.php on line 139

Everything is up to date, and I’ve tried disabling all plugins.

Any tips on how to fix this?

I don’t think I previously have added any email settings to the site, so it should have been a clean slate.

One Answer

Try this in dev or back up first.

Set 'useProjectConfigFile' => true, in your config/general.php and refresh your Control Panel. This will place a project.yaml file in your config/ folder.

Open that file and look for a portion that looks like this:

  fromEmail: [email protected]
  fromName: Sitename
  transportType: craftmailtransportadaptersSendmail

If only your transportType is empty, add craftmailtransportadaptersSendmail as above (you'll be able to change that later if needed). If more is missing, set at least what you see above and if you have no email section at all, add it.

Save the file then refresh your Control Panel. It should say Changes to project.yaml must be applied to the loaded project config. Hit the Sync changes button.

Next, check if you can access your mail settings again and if so set 'useProjectConfigFile' back to false.

Answered by Oli on December 30, 2021

Add your own answers!

Related Questions

Use of App::env() compared to getenv() since Craft 3.4.18

1  Asked on June 11, 2021 by james-white


pass cart fields on checkout

0  Asked on June 8, 2021 by glider


MySQL 5.6 backup to MySQL 5.7… what to do

1  Asked on June 6, 2021 by masiorama


Can I use a structure without slugs?

1  Asked on June 3, 2021 by arne-van-kauter


Order by dynamic field in custom Element Type

0  Asked on June 1, 2021 by matt-jenkins


Update from 3.5.19 to 3.6.15 Failed

1  Asked on May 29, 2021


Ask a Question

Get help from others!

© 2022 All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir