Hi Farrukh,
I don;t know about Apache James, but you can accomplish the same using
Java Mail API.
1.Create a table with data structure TO,From,Subject,Body,Attachment,WhenSent,etc..(i.e as columns).
2.For every email to be sent, insert those values into MailLog table.
3.Later run a Java program (say for every 2mins) which loops through each unsent mail and fires a email using mail API and updates the whensent column once delivered(you can also think of MultiThreaded coding here for better efficiency).
Thanks