Examples of Email


Examples of org.dspace.core.Email

            }
            else
            {

                Email email = Email.getEmail(I18nUtil
                        .getEmailFilename(supportedLocale, "subscription"));
                email.addRecipient(eperson.getEmail());
                email.addArgument(emailText.toString());
                email.send();

                log.info(LogManager.getHeader(context, "sent_subscription",
                        "eperson_id=" + eperson.getID()));

            }
View Full Code Here

Examples of org.dspace.core.Email

        try {
            String recipient = ConfigurationManager
                    .getProperty("alert.recipient");

            if (recipient != null) {
                Email email = Email
                        .getEmail(I18nUtil.getEmailFilename(
                                Locale.getDefault(), "internal_error"));
                email.addRecipient(recipient);
                email.addArgument(ConfigurationManager
                        .getProperty("dspace.url"));
                email.addArgument(new Date());

                String stackTrace;

                if (exception != null) {
                    StringWriter sw = new StringWriter();
                    PrintWriter pw = new PrintWriter(sw);
                    exception.printStackTrace(pw);
                    pw.flush();
                    stackTrace = sw.toString();
                } else {
                    stackTrace = "No exception";
                }

                email.addArgument(stackTrace);
                email.send();
            }
        } catch (Exception e) {
            // Not much we can do here!
            log.warn("Unable to send email alert", e);
        }
View Full Code Here

Examples of org.dspace.core.Email

            String recipient = ConfigurationManager
                    .getProperty("alert.recipient");

            if (recipient != null)
            {
                Email email = Email
                        .getEmail(I18nUtil.getEmailFilename(
                                Locale.getDefault(), "internal_error"));
                email.addRecipient(recipient);
                email.addArgument(ConfigurationManager
                        .getProperty("dspace.url"));
                email.addArgument(new Date());

                String stackTrace;

                if (exception != null)
                {
                    StringWriter sw = new StringWriter();
                    PrintWriter pw = new PrintWriter(sw);
                    exception.printStackTrace(pw);
                    pw.flush();
                    stackTrace = sw.toString();
                }
                else
                {
                    stackTrace = "No exception";
                }

                email.addArgument(stackTrace);
                email.send();
            }
        }
        catch (Exception e)
        {
            // Not much we can do here!
View Full Code Here

Examples of org.dspace.core.Email

            System.out
                    .println("After check remove the follow file: " + tmpfile);
        }
        else
        {
            Email email = Email.getEmail(I18nUtil
                    .getEmailFilename(supportedLocale, "statsubscription-"
                            + sfreq));
            email.addRecipient(eperson.getEmail());
            email.addArgument(ConfigurationManager.getProperty("dspace.url")
                    + "/rp/tools/stats/subscription/unsubscribe?clear=all");
            email.addArgument(ConfigurationManager.getProperty("dspace.url")
                    + "/rp/tools/stats/subscription/list.htm");
            email.addAttachment(file, "stat-" + sfreq + "-update.xls");
            email.send();
            file.delete();
        }
        log.info(LogManager.getHeader(context, "sent_statsubscription",
                "eperson_id=" + eperson.getID() + ", freq=" + sfreq));
    }
View Full Code Here

Examples of org.encuestame.persistence.domain.Email

    public UnitEmails createEmail(final UnitEmails unitEmails) throws EnMeExpcetion{
        if(unitEmails!= null){
            try {//
                final EmailList emailList = new EmailList();
                final String codeSubscribe = MD5Utils.md5(String.valueOf(System.currentTimeMillis()));
                final Email emailsDomain = new Email();
                emailsDomain.setEmail(unitEmails.getEmailName());
                emailsDomain.setSubscribed(Boolean.FALSE); //By Default is FALSE, user need subscribe.
                emailsDomain.setIdListEmail(emailList);
                getEmailListsDao().saveOrUpdate(emailsDomain);
                unitEmails.setIdEmail(emailsDomain.getIdEmail());
                //TODO: Necesitamos crear el registro con el hash !!
                final EmailSubscribe subscribe = new EmailSubscribe();
                subscribe.setEmail(emailsDomain);
                subscribe.setList(emailList);
                subscribe.setHashCode(codeSubscribe);
                getEmailListsDao().saveOrUpdate(subscribe);
                if (EnMePlaceHolderConfigurer.getBooleanProperty("application.email.enabled")) {
                    getMailService().send(emailsDomain.getEmail(),"Invitation to Subscribe Encuestame List","Invitation to Subscribe");
                }
                //TODO:Enviamos correo al usuario para que confirme su subscripcion.
            }
            catch (Exception e) {
                throw new EnMeExpcetion(e);
View Full Code Here

Examples of org.fenixedu.academic.domain.util.Email

    private void createEmailBatch(final Sender sender, final Person person, final Set<String> tos, final Set<String> ccs,
            Set<Set<String>> destinationBccs) {
        if (getRootDomainObjectFromPendingRelation() != null) {
            for (final Set<String> bccs : destinationBccs) {
                if (!bccs.isEmpty()) {
                    new Email(sender.getFromName(person), sender.getFromAddress(), getReplyToAddresses(person),
                            Collections.EMPTY_SET, Collections.EMPTY_SET, bccs, this);
                }
            }
            if (!tos.isEmpty() || !ccs.isEmpty()) {
                new Email(sender.getFromName(person), sender.getFromAddress(), getReplyToAddresses(person), tos, ccs,
                        Collections.EMPTY_SET, this);
            }
            setRootDomainObjectFromPendingRelation(null);
            setSent(new DateTime());
        }
View Full Code Here

Examples of org.hibernate.beanvalidation.tck.tests.methodvalidation.model.Email

  @Test(expectedExceptions = ValidationException.class)
  @SpecAssertion(section = "5.1.2", id = "j")
  public void testUnexpectedType() throws Exception {
    Constructor<Email> constructor = Email.class.getConstructor();
    Email returnValue = new Email();

    executableValidator.validateConstructorReturnValue( constructor, returnValue );
  }
View Full Code Here

Examples of org.hoteia.qalingo.core.domain.Email

    public void afterReturning(final StaticPart staticPart, final Object result) {
        if(logger.isDebugEnabled()){
            logger.debug("EmailNotificationAspect, afterReturning");
        }
        try {
            final Email email = (Email) result;
           
            final EmailNotificationMessageJms emailnotificationMessageJms = new EmailNotificationMessageJms();
            emailnotificationMessageJms.setEnvironmentName(environmentName);
            emailnotificationMessageJms.setEnvironmentId(environmentId);
            emailnotificationMessageJms.setApplicationName(applicationName);
            emailnotificationMessageJms.setServerName(InetAddress.getLocalHost().getHostName());
            emailnotificationMessageJms.setServerIp(InetAddress.getLocalHost().getHostAddress());
            if(email != null){
                emailnotificationMessageJms.setEmailType(email.getType());
            }
           
            // Generate and send the JMS message
            emailNotificationMessageProducer.generateMessages(emailnotificationMessageJms);
           
View Full Code Here

Examples of org.jamesii.core.util.EMail

   *          the mail adresses
   */
  public SendMailHook(String iMailHost, int iPort,
      ComputationTaskHook<I> oldHook, String from, String[] mailAdresses) {
    super(oldHook);
    mail = new EMail(iMailHost, iPort);
    this.sender = from;
    this.mailAdresses = mailAdresses;
  }
View Full Code Here

Examples of org.jboss.soa.esb.helpers.Email

   * @throws IOException
   * @{@link Deprecated} Use {@link Emailer} instead.
   */
  protected void sendEmailNotification (ConfigTree messageParams, byte[] msgPayload) throws AddressException, MessagingException, IOException
  {
    Email esbMail = createEmailInstance(messageParams);
    esbMail.setSendTo(messageParams.getAttribute(Email.SENDTO));
    esbMail.setFrom(messageParams.getAttribute(Email.FROM));
    esbMail.setCopyTo(messageParams.getAttribute(Email.COPYTO));
    esbMail.setSubject(messageParams.getAttribute(Email.SUBJECT));
    esbMail.setAttachments(messageParams.getTextChildren(Email.ATTACH));

    if (messageParams.getAttribute(MESSAGE_ATTACHMENT_NAME) != null) {
      esbMail.addAttachment(new ByteArrayInputStream(msgPayload), messageParams.getAttribute(MESSAGE_ATTACHMENT_NAME));
    } else {
      esbMail.setMessage(messageParams.getAttribute(Email.MESSAGE));
    }

    esbMail.sendMessage();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.