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

Thanks Julian Wachholz for the report and the initial patch.
alternatively, could treat this like databases where the lack of an option means `False`. Don't have a strong preference personally.