Moved mail functions from models/user.php to models/mail.php