I’m looking to use Javamail in a situation in which many emails will be sent from many users using their respective SMTP servers. (Yes, it resembles a spam framework, but it is a legitimate business product). I’m wondering if Javamail supports this situation as it looks like I will have to create a separate session for each user. So my questions are:
- Am I correct in that there will be one Javamail session needed per user?
- Are sessions light enough to create and clean as they will be ephemeral per user in my application?
- Does this design work or will javamail horribly break down under load, a situation in which many sessions are checked out, etc.?
- If “yes” to 3, is there an obvious library I should be using instead that works better in this situation?
contain mostly just configuration information, so they’re lighter weight
than a connection, for instance.