public void sendMessagesImmediately(Collection<MimeMessage> messages)
            throws MessagingException
    {
        EmailTask task = new EmailTask(messages);
        task.sendMessages();
    }
Sends a collection of email messages. This method differs from
{@link #sendMessages(Collection)} in that messages are sent
before this method returns rather than queueing the messages to be sent later.

@param messages the messages to send.
@throws MessagingException if an error occurs.
xmppserver/src/main/java/org/jivesoftware/util/EmailService.java