quantranhong1999 commented on code in PR #1561:
URL: https://github.com/apache/james-project/pull/1561#discussion_r1222586842
##########
server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/method/EmailSubmissionSetMethod.scala:
##########
@@ -269,7 +269,7 @@ class EmailSubmissionSetMethod @Inject()(serializer:
EmailSubmissionSetSerialize
mail = {
val mailImpl = MailImpl.builder()
.name(submissionId.value)
- .addRecipients(envelope.rcptTo.filter(m =>
m.parameters.isEmpty).map(_.email).asJava)
+ .addRecipients(envelope.rcptTo.filter(m => m.parameters.isEmpty ||
!(m.parameters.get.contains(ParameterName.holdFor) ||
m.parameters.get.contains(ParameterName.holdUntil))).map(_.email).asJava)
Review Comment:
Not solving `validation step above enforcing rcptTo not to have parameters`.
Please write a method with the return type `Try` to validate the rcptTo (and
put it above) instead.
BTW this predicate seems unreadable to me (extract to a method instead).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]