Answers.Body: <p>Try this in dev or back up first.</p>
  <p>Set <code>'useProjectConfigFile' =&gt; true,</code> in your <code>config/general.php</code> and refresh your Control Panel. This will place a <code>project.yaml</code> file in your <code>config/</code> folder.</p>
  <p>Open that file and look for a portion that looks like this:</p>
  <pre><code>email:
    fromEmail: your@email.com
    fromName: Sitename
    transportType: craft\mail\transportadapters\Sendmail
  </code></pre>
  <p>If only your <code>transportType</code> is empty, add <code>craft\mail\transportadapters\Sendmail</code> 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 <code>email</code> section at all, add it.</p>
  <p>Save the file then refresh your Control Panel. It should say <em>Changes to project.yaml must be applied to the loaded project config.</em> Hit the <strong>Sync changes</strong> button.</p>
  <p>Next, check if you can access your mail settings again and if so set <code>'useProjectConfigFile'</code> back to <code>false</code>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-27T12:01:39.720Z
Answers.Text: Thanks Olivier! This solved it.
Answers.UserDisplayName: Eddie
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-23T16:29:41.680Z
Answers.LastActivityDate: 2020-07-24T13:42:55.383Z
Answers.LastEditDate: 2020-07-24T13:42:55.383Z
Answers.UserDisplayName: Oli
Body: <p>I somehow can't access the email section of settings;
  /admin/settings/email</p>
  
  <pre><code>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
  </code></pre>
  
  <p>Everything is up to date, and I've tried disabling all plugins.</p>
  
  <p>Any tips on how to fix this?</p>
  
  <p>I don't think I previously have added any email settings to the site, so it should have been a clean slate.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-21T13:37:24.460Z
Comments.Text: Have you tried running `./craft project-config/rebuild`?
Comments.UserDisplayName: Oli
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-21T18:13:51.687Z
Comments.Text: 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?
Comments.UserDisplayName: Eddie
Tags: <craft3><control-panel>
Title: Cannot access email section of settings
ThreadText: # Cannot access email section of settings
  
  (Asked by: username_0 on 2019-05-21)
  
  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.
  
  **Tags:** craft3, control-panel
  
  > **Comments:**
  > **username_1**: Have you tried running `./craft project-config/rebuild`?  
  > **username_0**: 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?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-05-23. Score: 3 | Accepted 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: your@email.com
    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`.
  
  > **Comments:**
  > **username_0**: Thanks Olivier! This solved it.  
  
  ---
  
  