Fixes bug not containing user mail on Contact mail. (Issue #128)
This commit is contained in:
parent
416538532c
commit
934702a734
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue