camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ruben.martin" <ruben.mar...@fundacionctic.org>
Subject Re: How to send a mail
Date Mon, 12 Nov 2007 11:15:12 GMT

Ok, sorry, problem resolved. I got in my classpath the mock-javamail jar from
a previous test.


ruben.martin wrote:
> 
> Hello, i'm new to camel and i have read the examples but i cannot send an
> email even with the most simple test i have tried. Is there anything wrong
> in my code?
> 
> The code is below, thanks in advance.
> 
> public class MailSimpleTest extends ContextTestSupport {
> 
>     public void testSendAndReceiveMails() throws Exception {
> 
>         template.sendBody(template.getContext().getEndpoint("direct:a"),
> "hello world!");
>     }
> 
> 
>     @Override
>     protected RouteBuilder createRouteBuilder() {
>     	
>         return new RouteBuilder() {
>             public void configure() {
>                
> from("direct:a").to("smtp://ruben.martin@fundacionctic.org?password=xxxxx#ruben.martin@fundacionctic.org");
>             }
>         };
>     }
> }
> 

-- 
View this message in context: http://www.nabble.com/How-to-send-a-mail-tf4787595s22882.html#a13703767
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message