Fixed #22734 -- Moved SMTP-related settings to a dictionary

Thanks Julian Wachholz for the report and the initial patch.
FWIW, I prefer including a trailing comma in dicts like this so if more lines are added later, we don't need to modify the last line again (keeps diffs/git blame cleaner)