Answers.Body: <p>In case others need to resolve this issue with the input of this SQL command <code>DELETE from civicrm_setting WHERE name = 'mailing_backend';</code>
  I could access to the SMTP settings page right after.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-05T17:44:17.057Z
Answers.LastActivityDate: 2021-08-05T17:44:17.057Z
Answers.UserDisplayName: Ichi
Answers.Body: <p>What I think happened is that added the encryption key after I did the upgrade. I am not sure how I did this.  This was then causing the SMTP key not to be able to be read.</p>
  <p>I got the idea that maybe I could force blank values into the STMP form. While there I found this code.</p>
  <pre><code>if (!empty($this-&gt;_defaults['smtpPassword'])) {
            $this-&gt;_defaults['smtpPassword'] = \Civi::service('crypto.token')-&gt;decrypt($this-&gt;_defaults['smtpPassword']$
          }
  </code></pre>
  <p>I commented this out and the form loaded.  I saved without the key in the civicrm.settings.php file and then with the key again.</p>
  <p>Now everything works correctly again.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-06-11T00:50:55.263Z
Answers.Text: This worked for me, thank you. I was getting an error "failed to find key by id or tag civicrm"
Answers.UserDisplayName: Jeffery Green
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-01T15:39:54.550Z
Answers.LastActivityDate: 2021-04-01T15:39:54.550Z
Answers.UserDisplayName: Josh
Body: <p>After upgrading to 5.35.1 I am getting a memory limit reached error when loading the SMTP settings page. I am not sure if this is related but I am getting a growl error for &quot;Failed to find key by ID or tag&quot; and then a random string.</p>
  <p>I have tried getting to the page with and without the CiviCRM Secret Keys set in my settings file. I have cleared the cache. My memory limit is set at an obscene 3000M.</p>
  <p>I have this working on my dev server with the same SMTP settings.  The dev server has the CiviCRM Secret Keys set.  I am using;</p>
  <pre><code>define('CIVICRM_CRED_KEYS', '::SOME VALUE');
  </code></pre>
  <p>Any help or ideas of how to fix this are appreciated.</p>
  <p>Thanks,
  Josh</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-03-31T08:52:38.757Z
Comments.Text: Can you confirm the version, 5.31.1 is pretty old and has security vulnerabilities that are fixed in 5.35.1 :-)
Comments.UserDisplayName: HomoTechsual
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-03-31T16:25:55.110Z
Comments.Text: Thank you it is 5.35.1. Yikes, sorry!
Comments.UserDisplayName: Josh
Tags: <civimail><smtp>
Title: Memory Error (500) For SMTP Settings After Upgrading to 5.35.1
ThreadText: # Memory Error (500) For SMTP Settings After Upgrading to 5.35.1
  
  (Asked by: username_0 on 2021-03-30)
  
  After upgrading to 5.35.1 I am getting a memory limit reached error when loading the SMTP settings page. I am not sure if this is related but I am getting a growl error for "Failed to find key by ID or tag" and then a random string.
  I have tried getting to the page with and without the CiviCRM Secret Keys set in my settings file. I have cleared the cache. My memory limit is set at an obscene 3000M.
  I have this working on my dev server with the same SMTP settings.  The dev server has the CiviCRM Secret Keys set.  I am using;
  define('CIVICRM_CRED_KEYS', '::SOME VALUE');
  
  Any help or ideas of how to fix this are appreciated.
  Thanks,
  username_0
  
  **Tags:** civimail, smtp
  
  > **Comments:**
  > **username_1**: Can you confirm the version, 5.31.1 is pretty old and has security vulnerabilities that are fixed in 5.35.1 :-)  
  > **username_0**: Thank you it is 5.35.1. Yikes, sorry!  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2021-08-05. Score: 1
  
  In case others need to resolve this issue with the input of this SQL command `DELETE from civicrm_setting WHERE name = 'mailing_backend';`
  I could access to the SMTP settings page right after.
  
  
  ---
  
  ### Answer by username_0 on 2021-04-01. Score: 1
  
  What I think happened is that added the encryption key after I did the upgrade. I am not sure how I did this.  This was then causing the SMTP key not to be able to be read.
  I got the idea that maybe I could force blank values into the STMP form. While there I found this code.
  if (!empty($this->_defaults['smtpPassword'])) {
            $this->_defaults['smtpPassword'] = \Civi::service('crypto.token')->decrypt($this->_defaults['smtpPassword']$
          }
  
  I commented this out and the form loaded.  I saved without the key in the civicrm.settings.php file and then with the key again.
  Now everything works correctly again.
  
  > **Comments:**
  > **username_3**: This worked for me, thank you. I was getting an error "failed to find key by id or tag civicrm"  
  
  ---
  
  