The basics are that any properties listed in the
Here might be some example properties.
<Resource id="SuperbizMail" type="javax.mail.Session"> mail.smtp.host=mail.superbiz.org mail.smtp.port=25 mail.transport.protocol=smtp mail.smtp.auth=true mail.smtp.user=someuser password=mypassword </Resource>
You can create as many
Careful not to add whitespace at the end of your property values. A java.util.Properties object will leave those in the property values and they will be passed to the JavaMail provider with the whitespace on the end which may cause issues if the provider does not actively trim the values before attempting to use them.
If you wanted to do a System property or InitialContext property override of the above example mail session, you could do so like this:
java ... -DSuperbizMail.mail.smtp.host=localhost
All edits are reviewed before going live, so feel free to do much more than fix typos or links. If you see a page that could benefit from an entire rewrite, we'd be thrilled to review it. Don't be surprised if we like it so much we ask you for help with other pages :)NOTICE: unless indicated otherwise on the pages in question, all editable content available from apache.org is presumed to be licensed under the Apache License (AL) version 2.0 and hence all submissions to apache.org treated as formal Contributions under the license terms.