2

I somehow can't access the email section of settings; /admin/settings/email

Argument 1 passed to craft\helpers\MailerHelper::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.

2
  • 1
    Have you tried running ./craft project-config/rebuild?
    – Oli
    May 21, 2019 at 13:37
  • Thanks for the suggestion Olivier. Unfortunately didn't work, but I also have useProjectConfigFile set to false. Forgot to mention that. Is it any way to rebuild the whole craft install via CLI? Or possibly empty certain db-tables?
    – Eddie
    May 21, 2019 at 18:13

1 Answer 1

3

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:

email:
  fromEmail: [email protected]
  fromName: Sitename
  transportType: craft\mail\transportadapters\Sendmail

If only your transportType is empty, add craft\mail\transportadapters\Sendmail 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.

1
  • Thanks Olivier! This solved it.
    – Eddie
    May 27, 2019 at 12:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.