}
public void sendMail(final String name, String[] addressees,
String subject, final Map<String, Serializable> parameters,
IsoMailAttachment[] attachments) {
final IsoTemplateProcessor templateProcessor = context
.getTemplateProcessor();
IsoIOManager ioManager = context.getIOManager();
templateProcessor.getMimeType(name);
try {
ioManager.openTempFileForWrite(new IsoWriterHandler() {
public void handle(Writer writer) throws IOException {
templateProcessor.process(name, writer, parameters);
}
});
} catch (IOException exception) {
context.getLog().warn(exception);
}