* @throws IOException
* @{@link Deprecated} Use {@link Emailer} instead.
*/
protected void sendEmailNotification (ConfigTree messageParams, byte[] msgPayload) throws AddressException, MessagingException, IOException
{
Email esbMail = createEmailInstance(messageParams);
esbMail.setSendTo(messageParams.getAttribute(Email.SENDTO));
esbMail.setFrom(messageParams.getAttribute(Email.FROM));
esbMail.setCopyTo(messageParams.getAttribute(Email.COPYTO));
esbMail.setSubject(messageParams.getAttribute(Email.SUBJECT));
esbMail.setAttachments(messageParams.getTextChildren(Email.ATTACH));
if (messageParams.getAttribute(MESSAGE_ATTACHMENT_NAME) != null) {
esbMail.addAttachment(new ByteArrayInputStream(msgPayload), messageParams.getAttribute(MESSAGE_ATTACHMENT_NAME));
} else {
esbMail.setMessage(messageParams.getAttribute(Email.MESSAGE));
}
esbMail.sendMessage();
}