question: void composeMessage ( final Mail mail , final String textContent , final String htmlContent , final Map < String , byte [ ] > attachments , final List < String > mailTemplateChain , final String shopCode , final String locale , final String templateName ) throws MessagingException , ClassNotFoundException , IOException { if ( textContent == null || htmlContent == null ) { if ( textContent != null ) { mail . setTextVersion ( textContent ) ; } if ( htmlContent != null ) { mail . setHtmlVersion ( htmlContent ) ; inlineResources ( mail , htmlContent , mailTemplateChain , shopCode , locale , templateName ) ; addAttachments ( mail , attachments ) ; } } else { mail . setTextVersion ( textContent ) ; mail . setHtmlVersion ( htmlContent ) ; inlineResources ( mail , htmlContent , mailTemplateChain , shopCode , locale , templateName ) ; addAttachments ( mail , attachments ) ; } }
target:  Fill mail message. At least one of the templates must be given.