T - the type of the source from which to prefill the Mime Message(s)U - the return type of what gets created (usually a MimeMessage or an
Iterator of MimeMessage)@Role
@Unstable
public interface MimeMessageFactory<T,U>
MimeMessage. This allows Component implementers the ability to
create and pre-fill one or several MimeMessage objects according to some algorithm.
For example a Template Mime Message Factory could compute the subject and its content from an XObject in a wiki
page. And a Group Mime Message Factory could generate an Iterator of MimeMessage, which itself would generate one
MimeMessage per user in the Group.U createMessage(javax.mail.Session session, T source, Map<String,Object> parameters) throws javax.mail.MessagingException
MimeMessage.session - the JavaMail Session needed to create the instance(s) of MimeMessage
(contains all configuration such as SMTP server, SMTP port, etc)source - the source from which to prefill the Mime Message(s) (depends on the implementation)parameters - an optional generic list of parameters. The supported parameters depend on the implementationMimeMessage(s) that can then be further modified by the userjavax.mail.MessagingException - in case of an error while creating the MimeMessage(s)Copyright © 2004–2015 XWiki. All rights reserved.