AnswerBun.com

Cannot access email section of settings

Craft CMS Asked on December 30, 2021

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

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:

email:
  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

Enupal Backup not backing up assets

2  Asked on January 4, 2022

 

Using a variable for a hash key

2  Asked on December 2, 2021

 

Freeform with project.yaml?

2  Asked on November 7, 2021

 

Filter users: in group AND not in other group

1  Asked on October 1, 2021 by user10961

     

Create new tables with a custom module

1  Asked on October 1, 2021 by de-potter-bart

 

Ask a Question

Get help from others!

© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP