creating an email account on mail server by mail api

I have a requirement of creating a webmethod application in which i need to create an email id on mail server based on some adapter notification in a database table containing employee records. As soon as a new employee details in entered in the table i need to create a particular mail id for the employee(based on ex:name_id@xxs.com). This is like any email service provider do, like gmail(for creating an email account on their site).
Manually i can create email ids on this server but i want this in programmatic way.
I am new to java mail api. Can anyone provide any hint for this.

Any help will be appreciated.

Do we get any free mail server API for this purpose so that i can code and test the requirement in my local first before implementing it in my project.
Can anyone provide the details if it is possible.

Thanks…