Package org.springframework.mail.javamail

Examples of org.springframework.mail.javamail.MimeMessagePreparator


        }
    }

    public void send(MimeMessagePreparator[] preparators) throws MailException {
        for (int i = 0; i < preparators.length; i++) {
            MimeMessagePreparator preparator = preparators[i];
            send(preparator);
        }
    }
View Full Code Here


            throw new JBIException("You must configure the sender property");
        }
    }

    protected void process(final MessageExchange exchange, final NormalizedMessage message) throws javax.jbi.messaging.MessagingException {
        MimeMessagePreparator preparator = new MimeMessagePreparator() {
            public void prepare(MimeMessage mimeMessage) throws MessagingException {
                marshaler.prepareMessage(mimeMessage, exchange, message);
            }
        };
        try {
View Full Code Here

    this.mailSender = mailSender;
  }

  protected void doTask(final Map<Object, Object> context) {
    final String from = ((JavaMailSenderImpl)mailSender).getUsername();
    MimeMessagePreparator preparator = new MimeMessagePreparator(){
      public void prepare(MimeMessage mimeMessage) throws Exception {
        MimeMessageHelper helper = new MimeMessageHelper(mimeMessage, "UTF-8");
        // default from use @code JavaMailSender, @code AbstractEmailTask Implementer can override it
        helper.setFrom(from);
        prepareMessage(helper, context);
View Full Code Here

        super(endpoint);
        this.sender = sender;
    }

    public void process(final Exchange exchange) {
        sender.send(new MimeMessagePreparator() {
            public void prepare(MimeMessage mimeMessage) throws Exception {
                getEndpoint().getBinding().populateMailMessage(getEndpoint(), mimeMessage, exchange);
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Sending MimeMessage: " + MailUtils.dumpMessage(mimeMessage));
                }
View Full Code Here

        this.endpoint = endpoint;
        this.sender = sender;
    }

    public void process(final Exchange exchange) {
        sender.send(new MimeMessagePreparator() {
            public void prepare(MimeMessage mimeMessage) throws Exception {
                endpoint.getBinding().populateMailMessage(endpoint, mimeMessage, exchange);
            }
        });
    }
View Full Code Here

            throw new JBIException("You must configure the sender property");
        }
    }

    protected void process(final MessageExchange exchange, final NormalizedMessage message) throws Exception {
        MimeMessagePreparator preparator = new MimeMessagePreparator() {
            public void prepare(MimeMessage mimeMessage) throws MessagingException {
                marshaler.prepareMessage(mimeMessage, exchange, message);
            }
        };
        sender.send(preparator);
View Full Code Here

        }
    }

    public void send(MimeMessagePreparator[] preparators) throws MailException {
        for (int i = 0; i < preparators.length; i++) {
            MimeMessagePreparator preparator = preparators[i];
            send(preparator);
        }
    }
View Full Code Here

     * @param   hTemplateVariables  Variables to use when processing the template.
     */
    @Override
    public void send(final SimpleMailMessage msg,
                     final Map<String, Object> hTemplateVariables) {
        MimeMessagePreparator preparator = new MimeMessagePreparator() {
            @Override
            public void prepare(MimeMessage mimeMessage) throws Exception {
               MimeMessageHelper message = new MimeMessageHelper(mimeMessage);
               message.setTo(msg.getTo());
               message.setFrom(msg.getFrom());
View Full Code Here

        super(endpoint);
        this.sender = sender;
    }

    public void process(final Exchange exchange) {
        sender.send(new MimeMessagePreparator() {
            public void prepare(MimeMessage mimeMessage) throws Exception {
                getEndpoint().getBinding().populateMailMessage(getEndpoint(), mimeMessage, exchange);
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Sending MimeMessage: {}", MailUtils.dumpMessage(mimeMessage));
                }
View Full Code Here

        this.endpoint = endpoint;
        this.sender = sender;
    }

    public void process(final Exchange exchange) {
        sender.send(new MimeMessagePreparator() {
            public void prepare(MimeMessage mimeMessage) throws Exception {
                endpoint.getBinding().populateMailMessage(endpoint, mimeMessage, exchange);
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Sending MimeMessage: " + MailUtils.dumpMessage(mimeMessage));
                }
View Full Code Here

TOP

Related Classes of org.springframework.mail.javamail.MimeMessagePreparator

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.