JSMIME is a Java library to sign and/or encrypt E-Mails using the SMIME standard using many different algorithms and key strengths. Testing is done for compatibility with Netscape and Outlook to open the mails, decrypt and verify the signature.
The JSMIME project is sponsored by Together Teamlösungen
There are JUNIT regression test case provided using Eric Daugherty's Java Mail Server . The testcode should give you some hints how to use the library.
For running your on test we recommend downloading from CVS and using Maven as build tool. The JUNIT tests send mail to the local mail server which can be verified using a POP3 mail client. The mail account is "email@example.com" with the passowrd "test". The mail server is started with "bin/mailserver.bat" for Windows user.