public void officeCheck() {
        // move to receptionist for dynamic text
        //if (from == null) {
        //    throwMailFromAddressNotFoundException();
        //}
        if (toList == null || toList.isEmpty()) {
            throwMailToAddressNotFoundException();
        }
        if (bodyFile == null && plainBody == null) {
            String msg = "Not found body file or plain body: bodyFile=" + bodyFile + " plainBody=" + plainBody;
            throw new SMailPostcardIllegalStateException(msg);
        }
        if (!forcedlyDirect && (bodyFile != null && plainBody != null)) {
            String msg = "Set either body file or plain body: bodyFile=" + bodyFile + " plainBody=" + plainBody;
            throw new SMailPostcardIllegalStateException(msg);
        }
        if (plainBody == null && htmlBody != null) {
            String msg = "Cannot set html body only (without plain body): htmlBody=" + htmlBody;
            throw new SMailPostcardIllegalStateException(msg);
        }
        if (!forcedlyDirect && (!wholeFixedTextUsed && templateVariableMap == null)) {
            String msg = "Not found template variable map:";
            msg = msg + " wholeFixedTextUsed=" + wholeFixedTextUsed + " variableMap=" + templateVariableMap;
            throw new SMailPostcardIllegalStateException(msg);
        }
        if (!forcedlyDirect && (wholeFixedTextUsed && templateVariableMap != null)) {
            String msg = "Unneeded template variable map:";
            msg = msg + " wholeFixedTextUsed=" + wholeFixedTextUsed + " variableMap=" + templateVariableMap;
            throw new SMailPostcardIllegalStateException(msg);
        }
        // no check for no variable mail (fixed message)
        //if (templateVariableMap != null && templateVariableMap.isEmpty()) {
        //    String msg = "Empty variable map for template text: variableMap=" + templateVariableMap;
        //    throw new SMailPostcardIllegalStateException(msg);
        //}
    }
public void officeCheck ( ) { if ( toList == null || toList . isEmpty ( ) ) { throwMailToAddressNotFoundException ( ) ; } if ( bodyFile == null && plainBody == null ) { String msg = "Not found body file or plain body: bodyFile=" + bodyFile + " plainBody=" + plainBody ; throw new SMailPostcardIllegalStateException ( msg ) ; } if ( ! forcedlyDirect && ( bodyFile != null && plainBody != null ) ) { String msg = "Set either body file or plain body: bodyFile=" + bodyFile + " plainBody=" + plainBody ; throw new SMailPostcardIllegalStateException ( msg ) ; } if ( plainBody == null && htmlBody != null ) { String msg = "Cannot set html body only (without plain body): htmlBody=" + htmlBody ; throw new SMailPostcardIllegalStateException ( msg ) ; } if ( ! forcedlyDirect && ( ! wholeFixedTextUsed && templateVariableMap == null ) ) { String msg = "Not found template variable map:" ; msg = msg + " wholeFixedTextUsed=" + wholeFixedTextUsed + " variableMap=" + templateVariableMap ; throw new SMailPostcardIllegalStateException ( msg ) ; } if ( ! forcedlyDirect && ( wholeFixedTextUsed && templateVariableMap != null ) ) { String msg = "Unneeded template variable map:" ; msg = msg + " wholeFixedTextUsed=" + wholeFixedTextUsed + " variableMap=" + templateVariableMap ; throw new SMailPostcardIllegalStateException ( msg ) ; } }
------------