Mail notifications build fixes