On Thu, Mar 14, 2013 at 8:22 AM, Krishna.aradhya
<krishna.arad...@cognizant.com> wrote:
>    Hello folks,
>
>                I am running the below code but its giving the error like
> "Failed to resolve endpoint: smtp://krishna.arad...@cognizant.com due to: No
> component found with scheme: smtp". So, Please suggest me how to add the
> component for my code. Than you
>

Hi

Look at this page
http://camel.apache.org/components

And find the component it needs, eg that would be
SMTP / camel-mail

Which mean it needs the camel-mail JAR on the classpath (and its dependencies)
If you use maven then its just adding a dependency on camel-mail and
you are ready.

>
>
> public class MessageSendingExample {
> public static void main(String args[]) throws Exception {
> CamelContext context = new DefaultCamelContext();
> context.addRoutes(new RouteBuilder() {
> private Object subject;
>
> @SuppressWarnings("null")
> public void configure() {
>
>         from("file:C:\\DellBoomi?noop=true").setHeader("subject",
> constant(subject)).to("file:D:\\Others");
> };
> });
>
>
> context.start();
> System.out.println("HELLO");
> Map<String, Object> map = new HashMap<String, Object>();
> map.put("To", "krishna.arad...@cognizant.com");
> map.put("From", "krishna.arad...@cognizant.com");
> map.put("Subject", "Camel rocks");
> ProducerTemplate template = context.createProducerTemplate();
> String body = "Hello Claus.\nYes it does.\n\nRegards Krish.";
> template.sendBodyAndHeaders("smtp://krishna.arad...@cognizant.com", body,
> map);
> System.out.println("HELLO123");
>
> Thread.sleep(10000);
> context.stop();
>
>
>
> }
> }
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Failed-to-resolve-endpoint-smtp-krishna-aradhya-cognizant-com-due-to-No-component-found-with-scheme-p-tp5729156.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to