let w_field' = function
| `Received (l, Some date) ->
let w_data = function
| `Word word -> Address.Encoder.w_word word
| `Domain domain -> Address.Encoder.w_domain domain
| `Addr addr -> Address.Encoder.w_mailbox' addr
in
string "Received: "
$ (fun k -> Wrap.(lift ((hovbox 0 $ w_lst space w_data l $ close_box
$ hovbox 0 $ string ";" $ space $ Date.Encoder.w_date date $ close_box) (unlift k))))
$ w_crlf
| `Received (l, None) ->
let w_data = function
| `Word word -> Address.Encoder.w_word word
| `Domain domain -> Address.Encoder.w_domain domain
| `Addr addr -> Address.Encoder.w_mailbox' addr
in
string "Received: "
$ (fun k -> Wrap.(lift ((hovbox 0 $ w_lst space w_data l $ close_box) (unlift k))))
$ w_crlf
| `ReturnPath (Some m) ->
string "Return-Path: "
$ (fun k -> Wrap.(lift ((hovbox 0 $ Address.Encoder.w_mailbox' m $ close_box) (unlift k))))
$ w_crlf
| `ReturnPath None ->
string "Return-Path: < >" $ w_crlf