Add mail encoding/decoding