Finally fixed email notification issues