Problem/Motivation
The migration of system.mail settings migration (d7_system_mail) assumes that the mail_system
variable is always set, and it always has a default-system
key. This is not correct. I checked the most recent Drupal 7 codebase, and the only place where it is used (excluding tests) is the drupal_mail_system()
function, but that function only reads this variable.
Proposed resolution
Change the interface/default
process pipeline: If the mail_system
variable is not null, try to explode it first before applying the static_map
. The static map should allow bypassing, and have a trailer default value process (with the Drupal 8|9 default value). If the mail_system
variable doesn't exist (so it is NULL), then we also have to use the Drupal8|9 default value.