java · spring

How To send Email with attachment in java with spring

1-add Emailtemplate.vm to class path of java i mean src/main/java <html> <body> <h3 >${subject} </h3> <div>   ${messageBody} </div> <h3>File ID=${FileID}    <br> Provider ID=${ProviderID} </h3> </body> </html> 2-then add dependency in pom file for volicity <dependency> <groupId>maven</groupId> <artifactId>velocity</artifactId> <version>1.5-20060721.044818</version> <exclusions> <exclusion> <groupId>geronimo-spec</groupId> <artifactId>geronimo-spec-javamail</artifactId> </exclusion> <exclusion> <groupId>geronimo-spec</groupId> <artifactId>geronimo-spec-jms</artifactId> </exclusion> </exclusions> </dependency> 3- add bean in root context… Continue reading How To send Email with attachment in java with spring