I'll say first that I'm not an expert at working with certificates and public and private keys, but I do know that to encrypt data, you do need a private key, and you need to have a keystore set up correctly.
Did you mean that you only need it for
decryption (since you were talking about
reading an attachment in an encrypted mail)? If so, then you need to have the keystore set up with certificates and public keys of the sending party.
Maybe this will help:
Secure JavaMail with JSSE (although it's already an old article from 2001)
Java Secure Socket Extension (JSSE) Homepage (look at the documentation, you can find a JSSE Reference Guide for Java 1.4 and 5.0 there)
[ February 09, 2007: Message edited by: Jesper Young ]