Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.8.0
-
None
Description
In order to create a custom Message-Id, one must currently override the method "newMessageId" e.g.
return new MessageImpl() {
@Override
protected UnstructuredField newMessageId(String hostname)
};
However, in some cases Mime4j instantiates the MessageImpl internally e.g. DefaultMessageBuilder.parseMessage and therefore the newMessageId function cannot be overwridden. This means that I cannot use DefaultMessageBuilder to create a MessageImpl in which I control how the Message-Id is created.
I have attached a patch to make DefaultMessageBuilder take a MessageImplFactory to create the MessageImpl.