camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Srini97 <>
Subject extended Camel Mail Component not working
Date Mon, 12 Apr 2010 11:17:47 GMT


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 endpoint =
	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();
         // 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

         // stop the producer, we want to be nice and cleanup

   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:
Sent from the Camel - Users mailing list archive at

View raw message