Session beans "Mailer"
----------------------
SessionMailer     : session bean using javax.mail.Session mail factory
MimePartDSMailer  : session bean using javax.mail.internet.MimePartDataSource mail factory

Compiling this example:
-----------------------
ant -find build.xml install

Running this example:
---------------------
In order to run this example, you must configure two types of mail factory :
You can use the provided templates :
  $JONAS_ROOT/conf/MailSession1
  $JONAS_ROOT/conf/MailMimePartDS1

MailSession1 is a javax.mail.Session mail factory.
-> Only the property mail.host need to be defined.

MailMimePartDS1 is a javax.mail.internet.MimePartDataSource mail factory.
-> The properties mail.host, mail.to and mail.subject must be defined.

Assuming that jonas.service.mail.factories property is already set in
the jonas.properties file, start JOnAS, with the mail service.
  jonas start -Djonas.services=registry,jmx,security,jtm,dbm,ejb2,mail
(You can instead change the service list in jonas.properties)


Run the client :
jclient -cp $JONAS_BASE/ejbjars/mailsb.jar mailsb.ClientMailer  SessionMailer
or
Run the client via the Ant task runclient
    ant runclient

Stop the jonas server
  jonas stop

