Ignore:
Timestamp:
09/04/21 11:14:25 (3 years ago)
Author:
NikolaCenevski <cenevskinikola@…>
Branches:
master
Children:
ab49338
Parents:
194776a
Message:

Dodadeno posts to be approved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/it/finki/charitable/services/EmailService.java

    r194776a r5306751  
    2424        javaMailSender.send(message);
    2525    }
     26
     27    public void sendApprovalEmail(String to, String subject, Long postId) {
     28        SimpleMailMessage message = new SimpleMailMessage();
     29        message.setTo(to);
     30        message.setSubject(subject);
     31
     32        String text = "Your post has been approved\n" + "http://localhost:8080/post?postid=" + postId;
     33        message.setText(text);
     34        javaMailSender.send(message);
     35    }
     36
     37    public void sendNoApprovalEmail(String to, String subject, String description) {
     38        SimpleMailMessage message = new SimpleMailMessage();
     39        message.setTo(to);
     40        message.setSubject(subject);
     41
     42        String text = "Sorry, your post hasn't been approved" + "\n" +
     43                "Moderator:\n" + description;
     44        message.setText(text);
     45        javaMailSender.send(message);
     46    }
    2647}
Note: See TracChangeset for help on using the changeset viewer.