code: @Override
  	public MailSendResult send(MailMessage message) {
  
  		Assert.notNull(message, "Missing mail message!");
  
  		Properties props = new Properties();
  		props.put("mail.transport.protocol", "smtp");
  		props.put("mail.smtp.host", smtpHost);
  		props.put("mail.smtp.port", smtpPort);
  
  		Session session = getSession(props, smtpUsername, smtpPassword);
  
  		try {
  			// build mime message
  			Message msg = message.getMessage(session);
  
  			Enumeration enumer = msg.getAllHeaders();
  			while (enumer.hasMoreElements()) {
  				Header header = (Header) enumer.nextElement();
  				log.info(header.getName() + ": " + header.getValue());
  			}
  
  			log.info("Getting transport...");
  
  			Transport transport = session.getTransport("smtp");
  			log.info("Connecting to SMTP server: " + smtpHost + ":" + smtpPort);
  
  			transport.connect();
  			transport.sendMessage(msg, msg.getAllRecipients());
  
  			log.info("Closing transport...");
  			transport.close();
  		}
  		catch (Exception e) {
  
  			log.error(e.getMessage(), e);
  			return MailSendResult.fail();
  		}
  
  		return MailSendResult.ok();
  
  	}
docs: Sends message out via SMTP
  
  @param message to construct mail message
  @return result of send