class SentByMailet extends GenericMatcher {

    @Override
    public Collection<MailAddress> match(Mail mail) {
        return AttributeUtils
            .getAttributeValueFromMail(mail, Mail.SENT_BY_MAILET_ATTRIBUTE.getName())
            .map(any -> mail.getRecipients())
            .orElse(ImmutableList.of());
    }

}