successful registration. correct? In your servlet(which is invoked on submit action), if(user input is valid){ Step1: registerUser(); Step2: send confirmationEmail(); } else { Step3: Exception case } Send email method would ideally send the request to an JMS(queue) to send the email to the desired user. Below is a snippet to send an email. //Sample java code to send email public void sendEmail(){ try{ Properties props = null; if (props == null) { props = System.getProperties(); } props.put("mail.smtp.host", ""); Session session = Session.getInstance(props, null); MimeMessage message = new MimeMessage(session); message.setFrom(new InternetAddress("")); message.addRecipients(Message.RecipientType.CC, ""); message.setSubject(""); message.setContent("", "text/plain"); Transport.send(message); logger.info("Sent Email :" + "From :" + message.getFrom() + "To:" + message.getAllRecipients() + "Subject:" + message.getSubject() ); } catch(Exception ex){ ex.printStackTrace(); } } share improve this answer