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

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


        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


        if (!StringUtils.isEmpty(description)) {
            body += "\n" + description;
        }
        final String sendingEmail = person.getEmailForSendingEmails();
        if (!StringUtils.isEmpty(sendingEmail)) {
            new Message(Bennu.getInstance().getSystemSender(), Collections.EMPTY_LIST, Collections.EMPTY_LIST, subject, body,
                    sendingEmail);
        }
    }
View Full Code Here

        if (job.getPerson() != null) {
            List<String> emails = new ArrayList<String>();
            emails.add(job.getPerson().getInstitutionalOrDefaultEmailAddressValue());
            String subject = "Pedido de " + job.getDescription() + " concluido";
            String body = "O seu pedido de " + job.getDescription() + " já se encontra disponível no sistema Fénix.";
            new Message(Bennu.getInstance().getSystemSender(), job.getPerson().getEmailForSendingEmails(), subject, body);
        }
    }
View Full Code Here

            String subject = "Job " + job.getClass().getName() + "failed 3 times";
            String body =
                    "Viva\n\n" + "O trabalho com o externalId de " + job.getExternalId() + " falhou mais de 3 vezes.\n\n"
                            + "Request Time : " + job.getRequestDate() + "\n" + "Start Time : " + job.getJobStartTime() + "\n"
                            + "User : " + getQueueJobResponsibleName(job) + "\n" + "\n\n Error Stack Trace:\n" + sw.toString();
            new Message(Bennu.getInstance().getSystemSender(), Bennu.getInstance().getSystemSender()
                    .getRoleRecipient(RoleType.MANAGER), subject, body);
        }
    }
View Full Code Here

        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

            final String noneSentString = BundleUtil.getString(Bundle.APPLICATION, "error.email.none.sent");
            request.setAttribute("errorMessage", noneSentString + " " + validate);
            request.setAttribute("emailBean", emailBean);
            return mapping.findForward("new.email");
        }
        final Message message = emailBean.send();
        request.setAttribute("created", Boolean.TRUE);
        return new FenixActionForward(request, new ActionForward("/viewSentEmails.do?method=viewEmail&messagesId="
                + message.getExternalId(), true));
    }
View Full Code Here

    }

    public ActionForward viewEmail(final ActionMapping mapping, final ActionForm actionForm, final HttpServletRequest request,
            final HttpServletResponse response) {
        final String messageParam = request.getParameter("messagesId");
        final Message message =
                messageParam != null && !messageParam.isEmpty() ? FenixFramework.<Message> getDomainObject(messageParam) : null;
        return viewEmail(mapping, request, message);
    }
View Full Code Here

    }

    public ActionForward deleteMessage(final ActionMapping mapping, final ActionForm actionForm,
            final HttpServletRequest request, final HttpServletResponse response) {
        final String messageParam = request.getParameter("messagesId");
        final Message message =
                messageParam != null && !messageParam.isEmpty() ? FenixFramework.<Message> getDomainObject(messageParam) : null;
        if (message == null) {
            return viewSentEmails(mapping, actionForm, request, response);
        } else {
            final Sender sender = message.getSender();
            MessageDeleteService.delete(message);
            return viewSentEmails(mapping, request, sender.getExternalId());
        }
    }
View Full Code Here

    }

    @Atomic
    public ActionForward resubmit(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) {
        Message message = getMessageFromRequest(request);
        message.setSent(null);
        message.setRootDomainObjectFromPendingRelation(rootDomainObject);
        request.setAttribute("message", message);
        return mapping.findForward("view.email");

    }
View Full Code Here

        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

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.