mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-15 11:07:57 +01:00
Return to java 1.7
This commit is contained in:
parent
f85585b3b0
commit
f7318161b6
4
pom.xml
4
pom.xml
@ -119,8 +119,8 @@
|
|||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.1</version>
|
<version>3.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.8</source>
|
<source>1.7</source>
|
||||||
<target>1.8</target>
|
<target>1.7</target>
|
||||||
<encoding>UTF-8</encoding>
|
<encoding>UTF-8</encoding>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
@ -53,8 +53,10 @@ public final class Mailer {
|
|||||||
|
|
||||||
public void sendEmail(final String from, final String to, final String subject, final Map model,
|
public void sendEmail(final String from, final String to, final String subject, final Map model,
|
||||||
@NotNull final String templateMail) {
|
@NotNull final String templateMail) {
|
||||||
|
final MimeMessagePreparator preparator =
|
||||||
this.mailSender.send(mimeMessage -> {
|
new MimeMessagePreparator() {
|
||||||
|
public void prepare(MimeMessage mimeMessage)
|
||||||
|
throws Exception {
|
||||||
final MimeMessageHelper message = new MimeMessageHelper(mimeMessage);
|
final MimeMessageHelper message = new MimeMessageHelper(mimeMessage);
|
||||||
message.setTo(to);
|
message.setTo(to);
|
||||||
message.setFrom(from);
|
message.setFrom(from);
|
||||||
@ -62,7 +64,10 @@ public final class Mailer {
|
|||||||
|
|
||||||
final String messageBody = VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, "/mail/" + templateMail, model);
|
final String messageBody = VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, "/mail/" + templateMail, model);
|
||||||
message.setText(messageBody, true);
|
message.setText(messageBody, true);
|
||||||
});
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
this.mailSender.send(preparator);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMailSender(JavaMailSender mailer) {
|
public void setMailSender(JavaMailSender mailer) {
|
||||||
|
Loading…
Reference in New Issue
Block a user