camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Lynch <fr...@iona.com>
Subject Re: Sending an email with Camel
Date Fri, 14 Sep 2007 15:49:54 GMT
Hi Bertrand,
I believe "ausernam@ahost" is the address to which the email will be
delivered. 
You can set the SMTP server via a properties object eg:

        Properties properties = new Properties();
        properties.put("mail.smtp.host", "localhost");
        mailSession = Session.getInstance(properties, null);

This code fragment was taken from MailMessageTest.java in:
 /components/camel-mail/src/test/java/org/apache/camel/component/mail/
HTH,
--Frank



On Fri, 2007-09-14 at 08:32 -0700, bgoetzmann wrote:
> Hi,
> 
> Camel is a very interesting project ! Thank you for all developers of this
> project.
> 
> Trying a first Java application I would like to send emails using a route ;
> so I try something like
> 
> ... .to("smtp://ausernam@ahost")
> 
> but is ausernam@ahost must be a address mail at witch you send the mail? How
> can I specify the smtp server?
> 
> I appreciate an example.
> 
> Thank you!
> 
> Bertrand.

Mime
View raw message