public String getFormattedBody ( final Object ... arguments ) { if ( StringUtils . isBlank ( this . text ) ) { LOGGER . warn ( "No email body is defined" ) ; return StringUtils . EMPTY ; } try { val templateFile = ResourceUtils . getFile ( this . text ) ; val contents = FileUtils . readFileToString ( templateFile , StandardCharsets . UTF_8 ) ; return String . format ( contents , arguments ) ; } catch ( final Exception e ) { LOGGER . trace ( e . getMessage ( ) , e ) ; return String . format ( this . text , arguments ) ; } }
Format body .