Problem/Motivation

prev_mail_system is not saved after being set.

Steps to reproduce

  1. Set some value for system.mail interface.default: drush cset system.mail interface.default foo
  2. Enable the SMTP module
  3. Visit /admin/config/system/smtp
  4. Select "On" for "Set SMTP as the default mailsystem"
  5. Click "Save configuration"
  6. Run drush cget smtp.settings and observe that prev_mail_system is not set to foo

Proposed resolution

Save prev_mail_system after setting it.

Remaining tasks

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Issue fork smtp-3267467

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

kevincooper created an issue. See original summary.

kevincooper’s picture

StatusFileSize
new633 bytes
kevincooper’s picture

Issue summary: View changes
joegraduate’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: save_prev_mail_system-3267467.patch, failed testing. View results

joegraduate’s picture

Status: Needs work » Needs review

I don't think the test failure is related to the changes contained in this patch. Looks like the autmoated testing configuration for this project needs to be updated to use a supported Drupal core version (and any broken tests in the current 8.x-1.x branch will need to be fixed).

joegraduate’s picture

StatusFileSize
new695 bytes
new1.13 KB

While reviewing #2, I noticed another problem with SMTPConfigForm::submitForm() related to the wrong \Drupal\Core\Config\Config instance is used to get the current smtp.settings prev_mail_system setting.

I've fixed this in the attached patch.

Status: Needs review » Needs work

The last submitted patch, 7: 3267467-7.patch, failed testing. View results

joegraduate’s picture

Status: Needs work » Needs review

The test failures are the same ones that appear to be happening on several different issues.

joegraduate’s picture

Created MR !14 from patch #7

bluegeek9’s picture

Status: Needs review » Reviewed & tested by the community

I have reviewed the code. The previous mail system does not get saved.

bluegeek9’s picture

Status: Reviewed & tested by the community » Fixed
//www.flaticon.com/free-icons/thank-you Thank you for your contribution! Your continued support makes this project sustainable.
There are multiple ways to show appreciation for the work contributed to this project including:
  • Triage issues and adding more context to existing issues.
  • Flagging SMTP as a favorite on the project page to help others discover it and show your support.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.