class SMTPAuthSuccessful extends GenericMatcher {

    @Override
    public Collection<MailAddress> match(Mail mail) {
        return mail
            .getAttribute(Mail.SMTP_AUTH_USER)
            .map(ignored -> mail.getRecipients())
            .orElse(ImmutableList.of());
    }

}