private void sendMailMessage(final SimpleMailMessage msg, final Long creatorId) { OutboundMail out = new OutboundMail(); out.setCreator(creatorId); out.setMessageBody(msg.getText()); out.setTo(msg.getTo()); sendMailMessage(msg, out); }
private void sendMailMessage(SimpleMailMessage msg, OutboundMail out) { mailSender.send(msg); Long id = outboundMailDao.store(out); log.debug("Saved OutboundMail {} to {}", id, out.getToAddress()); }