Fixes bug not containing user mail on Contact mail. (Issue #128)

This commit is contained in:
gkolokythas 2019-08-22 10:17:53 +03:00
parent 416538532c
commit 934702a734
1 changed files with 2 additions and 1 deletions

View File

@ -26,9 +26,10 @@ public class ContactEmailManager {
public void sendContactEmail(ContactEmailModel contactEmailModel, Principal principal) throws MessagingException {
UserInfo user = apiContext.getOperationsContext().getDatabaseRepository().getUserInfoDao().find(principal.getId());
SimpleMail mail = new SimpleMail();
String enrichedMail = contactEmailModel.getDescription() + "\n\n" + "Send by user: " + user.getEmail() ;
mail.setSubject(contactEmailModel.getSubject());
mail.setTo(environment.getProperty("contact_email.mail"));
mail.setContent(contactEmailModel.getDescription());
mail.setContent(enrichedMail);
mail.setFrom(user.getEmail());
apiContext.getUtilitiesService().getMailService().sendSimpleMail(mail);