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

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


        for (final PhdParticipant guiding : process.getGuidingsAndAssistantGuidings()) {
            if (guiding.isInternal()) {
                toNotify.add(((InternalPhdParticipant) guiding).getPerson());
            } else {
                guiding.ensureExternalAccess();
                new Message(Bennu.getInstance().getSystemSender(), Collections.<ReplyTo> emptyList(),
                        Collections.<Recipient> emptyList(), getSubjectPrefixed(process, subjectKey), getBodyText(process,
                                bodyKey), Collections.singleton(guiding.getEmail()));
            }
        }
View Full Code Here


        for (final PhdParticipant guiding : process.getGuidingsAndAssistantGuidings()) {
            if (guiding.isInternal()) {
                toNotify.add(((InternalPhdParticipant) guiding).getPerson());
            } else {
                guiding.ensureExternalAccess();
                new Message(Bennu.getInstance().getSystemSender(), Collections.<ReplyTo> emptyList(),
                        Collections.<Recipient> emptyList(), getSubjectPrefixed(process, subjectMessage), getBodyText(process,
                                bodyMessage), Collections.singleton(guiding.getEmail()));
            }
        }
View Full Code Here

            if (participant.isInternal()) {
                toNotify.add(((InternalPhdParticipant) participant).getPerson());
            } else {
                Unit unit = process.getAdministrativeOffice().getUnit();
                UnitBasedSender sender = unit.getUnitBasedSenderSet().iterator().next();
                new Message(sender, Collections.<ReplyTo> emptyList(), Collections.<Recipient> emptyList(), getSubjectPrefixed(
                        process, subject), getBodyText(process, body), Collections.singleton(participant.getEmail()));
            }
        }

        if (!toNotify.isEmpty()) {
View Full Code Here

                .getCandidacyDate();
    }

    @Override
    protected void generateMessage() {
        new Message(getSender(), null, Collections.<Recipient> emptyList(), buildMailSubject(), buildMailBody(), getEmail());
    }
View Full Code Here

        throw new DomainException("error.PhdThesisProcess.unexpected.participant.type");
    }

    protected void email(String email, String subject, String body) {
        final SystemSender sender = Bennu.getInstance().getSystemSender();
        new Message(sender, sender.getConcreteReplyTos(), null, null, null, subject, body, Collections.singleton(email));
    }
View Full Code Here

            }
        }

        if (isToSendMail()) {
            final Recipient recipient = new Recipient(getTargetAccessGroup());
            new Message(getSender(), recipient, buildMailSubject(), buildMailBody());

        }

    }
View Full Code Here

    private void generateMessageForGuiders() {
        for (final PhdParticipant guiding : getProcess().getGuidingsSet()) {
            if (guiding.isInternal()) {
                generateMessage(UserGroup.of(((InternalPhdParticipant) guiding).getPerson().getUser()));
            } else {
                new Message(getSender(), Collections.<ReplyTo> emptyList(), Collections.<Recipient> emptyList(),
                        buildMailSubject(), buildMailBody(), Collections.singleton(guiding.getEmail()));
            }
        }
    }
View Full Code Here

    }

    private void generateMessage(Group group) {
        Set<Person> members = FluentIterable.from(group.getMembers()).transform(Person.userToPerson).toSet();
        new PhdAlertMessage(getProcess(), members, getFormattedSubject(), getFormattedBody());
        new Message(getSender(), new Recipient("", group), buildMailSubject(), buildMailBody());
    }
View Full Code Here

                .getEmailMessageBodyForMissingCandidacyValidation(process);
    }

    @Override
    protected void generateMessage() {
        new Message(getSender(), null, Collections.<Recipient> emptyList(), buildMailSubject(), buildMailBody(), getEmail());
    }
View Full Code Here

        // initialize subject and body again with correct values
        super.init(buildSubject(getProcess()), buildBody(getProcess()));

        // TODO: add missing elements (Coordinator, AcademicOffice?)
        new PhdAlertMessage(getProcess(), getProcess().getPerson(), getFormattedSubject(), getFormattedBody());
        new Message(getSender(), new Recipient(Collections.singletonList(getProcess().getPerson())), buildMailSubject(),
                buildMailBody());
    }
View Full Code Here

TOP

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

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.