Package org.fenixedu.academic.domain.util.email

Examples of org.fenixedu.academic.domain.util.email.Recipient


        final String groupName =
                BundleUtil.getString(Bundle.GLOBAL, "label.group", new String[] { submission.getStudentGroup().getGroupNumber()
                        .toString() });
        Sender sender = ExecutionCourseSender.newInstance(course);
        Recipient recipient = new Recipient(groupName, UserGroup.of(Person.convertToUsers(recievers)));
        new Message(sender, sender.getConcreteReplyTos(), recipient.asCollection(), submission.getProject().getName(),
                submission.getTeacherObservation(), "");
    }
View Full Code Here


        final String toGroupName =
                BundleUtil.getString(Bundle.ACADEMIC, "label.send.email.to.candidates.group.to.name",
                        mobilityGroup.getDescription(), period.getExecutionInterval().getName());
        final Group group = UnionGroup.of(getCandidateGroups(mobilityGroup, period));

        final Recipient recipient = Recipient.newInstance(toGroupName, group);
        final EmailBean bean = new EmailBean();
        bean.setRecipients(Collections.singletonList(recipient));

        final Person person = AccessControl.getPerson();
        if (person != null) {
View Full Code Here

            if (thesisParticipationType == ThesisParticipationType.ORIENTATOR
                    || thesisParticipationType == ThesisParticipationType.COORIENTATOR) {
                persons.add(thesisEvaluationParticipant.getPerson());
            }
        }
        final Recipient recipient =
                new Recipient("Membros da tese " + getTitle().toString(), UserGroup.of(Person.convertToUsers(persons)));
        final String studentNumber = getStudent().getNumber().toString();
        final String title = getFinalFullTitle().getContent();
        final String subject = getMessage("message.thesis.reject.submission.email.subject", studentNumber);
        final String body = getMessage("message.thesis.reject.submission.email.body", studentNumber, title, rejectionComment);

        //
        final Sender sender = ScientificCouncilUnit.getScientificCouncilUnit().getUnitBasedSenderSet().iterator().next();

        new Message(sender, sender.getConcreteReplyTos(), recipient.asCollection(), subject, body, "");
    }
View Full Code Here

            studentsGroup = degreeStudentsGroup.getUserGroup();
            ExecutionDegree executionDegree = FenixFramework.getDomainObject(executionDegreeId);
            sender = CoordinatorSender.newInstance(executionDegree.getDegree());
        }

        Recipient recipient = Recipient.newInstance(label, studentsGroup);
        return EmailsDA.sendEmail(request, sender, recipient);
    }
View Full Code Here

    public ActionForward prepareMarkSheetsToConfirmSendMail(ActionMapping mapping, ActionForm actionForm,
            HttpServletRequest request, HttpServletResponse response) {
        MarkSheetSendMailBean bean = (MarkSheetSendMailBean) RenderUtils.getViewState("sendMailBean").getMetaObject().getObject();
        Group teachersGroup = TeachersWithMarkSheetsToConfirmGroup.get(bean.getExecutionPeriod(), bean.getDegreeCurricularPlan());
        String message = getResources(request, "ACADEMIC_OFFICE_RESOURCES").getMessage("label.markSheets.to.confirm.send.mail");
        Recipient recipient = Recipient.newInstance(message, teachersGroup);
        UnitBasedSender sender = bean.getDegree().getAdministrativeOffice().getUnit().getUnitBasedSenderSet().iterator().next();
        return EmailsDA.sendEmail(request, sender, recipient);
    }
View Full Code Here

    public ActionForward prepareGradesToSubmitSendMail(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) {
        MarkSheetSendMailBean bean = (MarkSheetSendMailBean) RenderUtils.getViewState("sendMailBean").getMetaObject().getObject();
        Group teachersGroup = TeachersWithGradesToSubmitGroup.get(bean.getExecutionPeriod(), bean.getDegreeCurricularPlan());
        String message = getResources(request, "ACADEMIC_OFFICE_RESOURCES").getMessage("label.grades.to.submit.send.mail");
        Recipient recipient = Recipient.newInstance(message, teachersGroup);
        UnitBasedSender sender =
                AdministrativeOffice.readDegreeAdministrativeOffice().getUnit().getUnitBasedSenderSet().iterator().next();
        return EmailsDA.sendEmail(request, sender, recipient);
    }
View Full Code Here

    public ActionForward sendEmail(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws Exception {
        final CerimonyInquiry cerimonyInquiry = getDomainObject(request, "cerimonyInquiryId");
        final Sender sender = getPublicRelationsSender();
        final Recipient recipient = cerimonyInquiry.createRecipient();
        return EmailsDA.sendEmail(request, sender, recipient);
    }
View Full Code Here

        Group groupToSend = StudentGroupGroup.get(studentGroup);
        Sender sender = ExecutionCourseSender.newInstance(executionCourse);
        final String label =
                getResources(request, "APPLICATION_RESOURCES").getMessage("label.students.group.send.email",
                        studentGroup.getGroupNumber(), studentGroup.getGrouping().getName());
        Recipient recipient = Recipient.newInstance(label, groupToSend);
        return EmailsDA.sendEmail(request, sender, recipient);
    }
View Full Code Here

        Group groupToSend = GroupingGroup.get(grouping);
        Sender sender = ExecutionCourseSender.newInstance(executionCourse);
        final String label =
                getResources(request, "APPLICATION_RESOURCES").getMessage("label.students.grouping.send.email",
                        grouping.getName());
        Recipient recipient = Recipient.newInstance(label, groupToSend);
        return EmailsDA.sendEmail(request, sender, recipient);
    }
View Full Code Here

                if (person != null) {
                    setRejector(person);
                }
                SystemSender systemSender = getRootDomainObject().getSystemSender();
                new Message(systemSender, systemSender.getConcreteReplyTos(),
                        new Recipient(UserGroup.of(getPerson().getUser())).asCollection(), BundleUtil.getString(Bundle.PERSONAL,
                                REJECTION_MAIL_SUBJECT_KEY), BundleUtil.getString(Bundle.PERSONAL, REJECTION_MAIL_BODY_KEY), "");

            }
            if (state == PhotoState.APPROVED) {
                Person person = AccessControl.getPerson();
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.util.email.Recipient

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.