Closed nmmull closed 1 year ago
In case I forget, I think we could just add an empty header (plus the custom header field). Both Mr.Mime and Ocamlnet will handle the creation of boundaries.
My comment above was not actually true. The boundaries need to be included in the header, I put a simple dummy string as the boundary, not sure if there is better practice for this.
An email which is only an attachment will have roughly the form
And so may be converted to something of the form
The question is: what should
~header
be? We can't simply adopt the header from the original email since this header will have a content disposition ofattachment
orinline
. This header should be the minimal one which indicates that the message is a multipart, and should include some custom header field which says that we constructed it.Note that the function
make_header
can be used here.