Fix for changes in params sent to alterMailParams hook in 5.47
It used to send groupName. Now it sends workflow
, and it sends with the same value as valueName instead of the old groupName.
So to keep backwards-compatibility, use groupName if available, then workflow, and check for both possible values.