added mail encoder