Encodes emails using javascript