Use the delete-javamail-resource subcommands in remote mode to delete a JavaMail session resource.
References to the specified resource must be removed before running the delete-javamail-resource subcommands.
Ensure that the server is running.
Remote subcommands require a running server.
List the JavaMail resources by using the list-javamail-resources(1) subcommands.
Delete a JavaMail resource by using the delete-javamail-resource(1) subcommands.
To apply your changes, restart GlassFish Server.
See To Restart a Domain.
This example deletes the JavaMail session resource named mail/MyMailSession.
asadmin> delete-javamail-resource mail/MyMailSession Command delete-javamail-resource executed successfully.
You can also view the full syntax and options of the subcommand by typing asadmin help delete-javamail-resource at the command line.