if (mail == null) return null;
MimeMessage message = mail.getMessage();
if (message == null) return null;
if (message.isMimeType("multipart/signed")
|| message.isMimeType("application/pkcs7-signature")
|| message.isMimeType("application/x-pkcs7-signature")
|| ((message.isMimeType("application/pkcs7-mime") || message.isMimeType("application/x-pkcs7-mime"))
&& message.getContentType().indexOf("signed-data") != -1)) {
return mail.getRecipients();
} else return null;