@ SuppressWarnings ( "unchecked" ) public < T extends IEntity > T sendEmail ( T entity , String email ) throws FMSException { if ( ! isAvailableToEmail ( entity ) ) { throw new FMSException ( "Following entity: " + entity . getClass ( ) . getSimpleName ( ) + " cannot be send as email" ) ; } IntuitMessage intuitMessage = prepareEmail ( entity , email ) ; //execute interceptors executeInterceptors ( intuitMessage ) ; return ( T ) retrieveEntity ( intuitMessage ) ; }
Send entity via email using specified address