The Builder's configure() method is called when camel context start.
At this time if the there is no message in the test.queue,  camel will not
send message to the smtp server.

Did you try to put some message into queue to see if the message is send to
the smtp server ?

Willem
----------------------------------
Apache Camel, Apache CXF committer
Open SOA http://www.fusesource.com
Blog http://willemjiang.blogspot.com
Tiwtter http://twitter.com/willemjiang 


unixployd wrote:
> 
> I tried to use Java DSL to configure my route from Active MQ to SMTP.
> That is the code:
> 
> public void configure() {
> String url = 
> "smtp://u...@domain.com?password=password&to=r...@domain.com&debugMode=true";
> from("activemq:queue:test.queue?concurrentConsumers=20").process(new
> QueueSmtpProcessor()).to(url);
> }
> 
> I can't send emails.
> 
> But if I use Injection @Produce and create own producer when I get what I
> need.
> 
>       @Produce
>       ProducerTemplate prod;
>       
>       public void configure() {
>               String url = 
> "smtp://u...@domain.com?password=password&to=r...@domain.com&debugMode=true";
>               
> from("activemq:queue:test.queue?concurrentConsumers=20").process(new
> QueueSmtpProcessor());
>               
>               prod.sendBody(body());
>               System.out.println("Message is sent");
>       }
> 
> Basing on Camel manuals I see that smtp Endpoint should successfully
> create Producer and handle all the stuff.
> What can be the problem?
> 
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Problems-with-SMTP-tp512137p512599.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to