public void sendMessages(Collection<MimeMessage> messages) {
        // If there are no messages, do nothing.
        if (messages.isEmpty()) {
            return;
        }
        TaskEngine.getInstance().submit(new EmailTask(messages));
    }
Send a collection of messages. To create a message, use the
{@link #createMimeMessage()} method.

@param messages a collection of the messages to send.
xmppserver/src/main/java/org/jivesoftware/util/EmailService.java