* Copyright 2006-2010 the original author or authors.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
that can send mail messages. If it fails there is
no guarantee about which of the messages were sent, but the ones that failed
can be picked up in the error handler. Because the mail protocol is not
transactional, failures should be dealt with here if possible rather than
allowing them to be rethrown (which is the default).
Delegates the actual sending of messages to a
, using the
, which normally uses
a single server connection for the whole batch (depending on the
implementation). The efficiency of for large volumes of messages (repeated
calls to the item writer) might be improved by the use of a special
that caches connections to the server in between
Stateless, so automatically restartable.
mailErrorHandlerthe mail error handler to set
java.lang.IllegalStateExceptionif the mandatory properties are not set
itemsthe items to send