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