Unless your boxmod has a boost circuit it's not going to have enough voltage. Most mods have a circuit that reduces the voltage of two Li-ion
batteries in series, which provides around 7.4v, down to the set voltage, transforming any excess power to heat. Two AA
batteries are only going to give you about 3v, not enough for the circuit to work. It wouldn't hurt anything to try it just to see what happens though.