Move mail logic to model and add spec.
Finished implement from mail in model.