Package org.jboss.soa.esb.helpers

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


      String host = configTree.getAttribute(Email.HOST, Configuration.getSmtpHost());
      String username = configTree.getAttribute(Email.USERNAME, Configuration.getSmtpUsername());
      String password = configTree.getAttribute(Email.PASSWORD,Configuration.getSmtpPassword());
      boolean auth = configTree.getBooleanAttribute(Email.AUTH, false);
     
      return new Email(host, port, username, password, auth);
  }
View Full Code Here

     * @param message
     * @throws IOException
     */
    protected void sendEmail(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

        String host = configTree.getAttribute(Email.HOST, Configuration.getSmtpHost());
        String username = configTree.getAttribute(Email.USERNAME, Configuration.getSmtpUsername());
        String password = configTree.getAttribute(Email.PASSWORD,Configuration.getSmtpPassword());
        boolean auth = configTree.getBooleanAttribute(Email.AUTH, false);
       
        return new Email(host, port, username, password, auth);
    }
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.helpers.Email

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.