esbMail.addAttachment(new ByteArrayInputStream(msgPayload), messageParams.getAttribute(MESSAGE_ATTACHMENT_NAME));
} else {
esbMail.setMessage(messageParams.getAttribute(Email.MESSAGE));
}
esbMail.sendMessage();
}
/**
* Allows smtp overrides by setting properties on the passed-in message. This could be
* populated by a previous action in an action pipline.