// the mail attributes are set.
if (signers != null) {
ArrayList signerinfolist = new ArrayList();
for (Iterator iter = signers.iterator(); iter.hasNext();) {
SMIMESignerInfo info = (SMIMESignerInfo) iter.next();
if (info.isSignValid()
&& (!onlyTrusted || info.getCertPath() != null)) {
signerinfolist.add((X509Certificate) info.getSignerCertificate());
}
}
if (signerinfolist.size() > 0) {
mail.setAttribute(mailAttribute, signerinfolist);