Issue #3272953 by stefanos.petrakis, matsbla, antiorario: Move mail-alter functions to their own class.
Closes #3272953