Hello,

I have a requirement for adding new options for the message , so I have
created new options like x_body , x_createAttachement , Based on these two
options I have to over ride the default nature of camel component. So I have
extended MailBinding and over ridden some methods. and written test cases
for that . test cases are working fine. But when I tried to send the
messages  using the following code it is not sending any messages but
calling producer send() method.


        CamelContext context=new DefaultCamelContext();
                
        OptaMailComponent component=new OptaMailComponent(context);

        OptaMailEndpoint endpoint =
(OptaMailEndpoint)component.createEndpoint("opta-smtp://optaukexch01.optasportsdata.com?to=srinivasa.dontiboy...@optasports.com&from=srinivasa.dontiboy...@optasports.com&consumer.delay=6000&subject=Hurry%20got%20the%20subject");


        OptaMailEndpoint endpoint =
(OptaMailEndpoint)component.createEndpoint("opta-smtp://optaukexch01.optasportsdata.com?to=srinivasa.dontiboy...@optasports.com&from=srinivasa.dontiboy...@optasports.com&consumer.delay=6000&subject=samplesubject");
                
        Exchange exchange = endpoint.createExchange();

        // set the in message payload (=body) with the name parameter
            exchange.getIn().setBody("sample body");


         // now we want to send the exchange to this endpoint and we then
need a producer
         // for this, so we create and start the producer.
          Producer producer = endpoint.createProducer();
          producer.start();
         
         
         
         // process the exchange will send the exchange to the file
component, that will process
         // the exchange and yes write the payload to the given filename
         producer.process(exchange);

         // stop the producer, we want to be nice and cleanup
         producer.stop();


   2) Even after creating source as jar and included in other component
where previously it used the default mail component is also not sending any
mail message to sender.

Thanks in advance for the help me! 





-- 
View this message in context: 
http://old.nabble.com/extended-Camel-Mail-Component-not-working-tp28216447p28216447.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to