refactory on changing the way of sending mail
refactory on changing the way of sending mail