Emails can be sent directly from your server side code in order to provide registration confirmations, updates or even debugging and stats reports.
In order to enable email sending you will need to setup the Emailer Service from the AdminTool: from theServerConfigurator choose the Emailer tab, turn on the service and set your SMTP parameters.
Restart the server and you are now ready to send emails using a couple of lines of code like this:
Email myEmail = new SFSEmail("firstname.lastname@example.org", "email@example.com", "Test mail", "Hello from SFS2X"); SmartFoxServer.getInstance().getMailService().sendEmail(myEmail);
There are three modalities to send emails: “blindly”, with a confirmation event and delayed. You can learn about this and lots more from the SFSPostOffice class in the javadoc.