mailbox.BabylMessage.set_boundary

BabylMessage.set_boundary(boundary)

Set the boundary parameter in Content-Type to ‘boundary’.

This is subtly different than deleting the Content-Type header and adding a new one with a new boundary parameter via add_header(). The main difference is that using the set_boundary() method preserves the order of the Content-Type header in the original message.

HeaderParseError is raised if the message has no Content-Type header.