Separating mail module and removing luasec and luasocket dependencies.