public void setMimeattach ( String strMimeattach , String fileName , String type , String disposition , String contentID , boolean removeAfterSend ) throws PageException { Resource file = ResourceUtil . toResourceNotExisting ( pageContext , strMimeattach ) ; pageContext . getConfig ( ) . getSecurityManager ( ) . checkFileLocation ( file ) ; if ( ! file . exists ( ) ) throw new ApplicationException ( "can't attach file " + strMimeattach + ", this file doesn't exist" ) ; smtp . addAttachment ( file , fileName , type , disposition , contentID , removeAfterSend ) ; }
set the value mimeattach Specifies the path of the file to be attached to the e - mail message . An attached file is MIME - encoded .