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

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


        String errorReportAddress = Installation.getInstance().getInstituitionalEmailAddress("nmci");
        String errorReportSubject =
                BundleUtil.getString(Bundle.CANDIDATE, "error.mobility.report.mail.subject", Unit.getInstitutionAcronym());
        String errorReportBody = sb.toString();

        SystemSender systemSender = Bennu.getInstance().getSystemSender();
        EmailBean emailBean = new EmailBean();
        emailBean.setSender(systemSender);
        emailBean.setReplyTos(systemSender.getConcreteReplyTos());
        emailBean.setRecipients(Collections.<Recipient> emptyList());
        emailBean.setSubject(errorReportSubject);
        emailBean.setMessage(errorReportBody);
        emailBean.setBccs(errorReportAddress);
        emailBean.send();
View Full Code Here


        final String token = getToken();
        final String URL =
                String.format(
                        "https://fenix.ist.utl.pt/external/partyContactValidation.do?method=validate&validationOID=%s&token=%s",
                        getExternalId(), token);
        final SystemSender sender = Bennu.getInstance().getSystemSender();
        final String subject = "Sistema Fénix @ IST : Validação de Email";
        final String body_format =
                "Caro Utilizador\n Deverá validar o seu email introduzindo o código %s na página de verificação ou \n carregar no seguinte link : \n %s \n Os melhores cumprimentos,\n A equipa Fénix";
        final String body = String.format(body_format, token, URL);
        new Message(sender, Collections.EMPTY_LIST, Collections.EMPTY_LIST, subject, body, getEmailValue());
View Full Code Here

        setWhenCreated(new DateTime());
    }

    @Atomic
    public void sendEmail(final String fromSubject, final String body) {
        SystemSender systemSender = getRootDomainObject().getSystemSender();
        new Message(systemSender, systemSender.getConcreteReplyTos(), Collections.EMPTY_LIST, fromSubject, body, getEmail());
    }
View Full Code Here

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

        private 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

            throw new PreConditionNotValidException();
        }
    }

    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

                logState("log.personInformation.photo.rejected");
                Person person = AccessControl.getPerson();
                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) {
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

    }

    private void sendEmailToPersons(Set<Person> persons, String personsName, String subject, String body) {
        if (!persons.isEmpty()) {
            final Recipient recipient = new Recipient(getString("label.teachers"), UserGroup.of(Person.convertToUsers(persons)));
            SystemSender systemSender = Bennu.getInstance().getSystemSender();
            new Message(systemSender, systemSender.getConcreteReplyTos(), recipient.asCollection(), subject, body, "");
        }
    }
View Full Code Here

                        .getGroupNumber().toString(), executionCourseNames.toString());
        final String groupName = messages.getMessage("message.group.name", studentGroup.getGroupNumber());
        final Collection<Recipient> recipients =
                Collections.singletonList(new Recipient(groupName, UserGroup.of(Person.convertToUsers(recievers))));

        SystemSender systemSender = Bennu.getInstance().getSystemSender();
        new Message(systemSender, systemSender.getConcreteReplyTos(), recipients,
                messages.getMessage("message.subject.grouping.change"), message, "");
    }
View Full Code Here

        final String message =
                messages.getMessage("message.body.grouping.change.unenrolment", registration.getNumber().toString(), studentGroup
                        .getGroupNumber().toString(), attend.getExecutionCourse().getNome());

        SystemSender systemSender = Bennu.getInstance().getSystemSender();
        new Message(systemSender, systemSender.getConcreteReplyTos(), recipients,
                messages.getMessage("message.subject.grouping.change"), message, "");

        return Boolean.TRUE;
    }
View Full Code Here

TOP

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

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.