camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krishna.aradhya" <krishna.arad...@cognizant.com>
Subject Failed to resolve endpoint: smtp://krishna.aradhya@cognizant.com due to: No component found with scheme: smtp
Date Thu, 14 Mar 2013 07:22:23 GMT
   Hello folks,

               I am running the below code but its giving the error like
"Failed to resolve endpoint: smtp://krishna.aradhya@cognizant.com due to: No
component found with scheme: smtp". So, Please suggest me how to add the
component for my code. Than you



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.aradhya@cognizant.com");
map.put("From", "krishna.aradhya@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.aradhya@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.

Mime
View raw message