You can create a JavaMail session in the following ways:
In the Administration Console, open the Resources component and select JavaMail Sessions. For details, click the Help button in the Administration Console.
Use the asadmin create-javamail-resource command. For details, see the Oracle GlassFish Server 3.0.1 Reference Manual.