With reference to my earlier question Why does Java class library still use String constants in place of enum, can someone recommend an online information source to look for what all String constants are permitted for a Java Standard Class library method accepting a String constant? For example, what String values can MessageDigest.getInstance
can take, other than "SHA" ? Similarly, what all properties can be fed into a Properties
instance to create a valid SMTP/IMAP Session
? Some of them are
properties.setProperty("mail.imap.auth", "true");
properties.setProperty("mail.imap.host", mailHost);
properties.setProperty("mail.imap.port", mailServerPort.toString());
properties.setProperty("mail.imap.starttls.enable","true");
properties.setProperty("mail.imap.starttls.enable","true");
properties.setProperty("mail.imap.ssl.enable","true");
Now create your Session
as
Session.getInstance(properties, authenticator);