It is simple all you need to have a valid SMTP available.
Rest add following code to your process java file.
startUp();
KnowledgeBase kbase = readKnowledgeBase();
StatefulKnowledgeSession ksession = JBPMHelper.newStatefulKnowledgeSession(kbase);
EmailWorkItemHandler emailHandler1 = new EmailWorkItemHandler();
emailHandler1.setConnection("smtp.gmail.com","587", "uremailId", "password");
emailHandler1.getConnection().setStartTls(true);
ksession.getWorkItemManager().registerWorkItemHandler("Email",emailHandler1);
ksession.startProcess("com.sample.bpmn.hello");
System.out.println("Process started ...");