adding email notification mixin
calling setmode outside of classes