Did you extend the camel mail component? if so, please add some break point in the MailProducer, and debug to see if the sender is called send the mail.

Willem

Srini97 wrote:

I have added three options in the configuration and when I tried with Unit
testcases it is working properly when I put some debug messages I can all the messages but the message is not delivered to mail that mentioned in the URI.

By the way I have changed the URI to my custom URI to identify my component
by autodiscovery so say for smtp , my own uri is
opta-smtp://x...@host?xbody=sadfsdf,

I have created opta-smtp file under
/src/main/resources/META-INF/services/org/apache/camel/component/opta-smtp

done the same for  all the protocols.


Thanks
Sri


willem.jiang wrote:
Hi

What kind of default nature of camel component is changed in your component?

Can you step into producer.process(exchange) to see what is happened ?


Willem

Srini97 wrote:
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&[email protected]&consumer.delay=6000&subject=Hurry%20got%20the%20subject");


        OptaMailEndpoint endpoint =
(OptaMailEndpoint)component.createEndpoint("opta-smtp://optaukexch01.optasportsdata.com?to=srinivasa.dontiboy...@optasports.com&[email protected]&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!








Reply via email to