Take in account mail dependency if mail module is enabled