Skip to content

Commit

Permalink
Send mail as html - parse name in title
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaszkononowicz committed Dec 1, 2018
1 parent de6ab37 commit 68748a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kiohub/src/main/java/pg/eti/kiohub/service/MailService.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class MailService {
@Value("${mail.invitation.text:Bierzesz udział w projekcie - {projectName} {projectLink}}")
private String text;

@Value("${mail.invitation.address:kiohub.pg.edu.pl/edit-project/{projectId}}")
@Value("${mail.invitation.address:http://kiohub.eti.pg.gda.pl/edit-project/{projectId}}")
private String address;

@Autowired
Expand All @@ -60,6 +60,7 @@ protected PasswordAuthentication getPasswordAuthentication() {
String link = address.replaceAll("\\{projectId\\}", project.getId().toString());
String messageText = text.replaceAll("\\{projectLink\\}", link);
messageText = messageText.replaceAll("\\{projectName\\}", project.getTitle());
subject = subject.replaceAll("\\{projectName\\}", project.getTitle());

for (String email : emails) {
Message message = new MimeMessage(session);
Expand Down

0 comments on commit 68748a0

Please sign in to comment.