The WebAdmin REST API allows to see mails in a mailQueue and in a mail repository. However, as of today, the amount of information that can be seen is limited, and has the following properties:
- The `name` that identifies the mail
- The envelope information (sender + recipients)
- And basic processing information (state and possible error).
We also should add the following properties in the view by default: `lastUpdated`, `remoteHost`, `remoteAddr`.
The basic answers becomes then:
We need to be able to get more details about the mail object.
We should be able to pass an `additionalFields`.
Supported additional fields would be:
You will need to:
- in /server/protocols/webadmin/webadmin-mailrepository project:
- Modify MailDTO to add new mandatory fields.
- MailRepositoriesRoutesTest :: retrievingAMailShouldDisplayItsInformation to take into account these new mandatory fields.
- MailDTO Should contain an enum called AdditionalFields
- MailDTO::fromMail should take a List<AdditionalFields> as argument
- Modify MailRepositoriesRoutes in order to take into account this URL parameter.
Please note that:
- Unknown additionalParameter values should be rejected
- empty additionalParameters should be filtered out and ignored
- This parameter can be ommited.
- Please add tests demonstrating the following behaviours in MailRepositoriesRoutesTest
Of course, as always, we are willing to provide help for these issues. Please don't hesitate to reach us on https://gitter.im/apache/james-project .