That would repeat sending emails as each poll if there is no file it triggers an empty message.
If you only want to do this once, then use a filter and check when the batch is done. filter(header("CamelBatchComplete")) .to("mail ...") .end() You can also use simple if you want a == true check filter(simple("${header.CamelBatchComplete} == true")) On Tue, Nov 17, 2015 at 9:22 AM, Jan Matèrne (jhm) <apa...@materne.de> wrote: > Reading files: http://camel.apache.org/file2.html > - react on "empty dir": sendEmptyMessageWhenIdle > Sending mails: http://camel.apache.org/mail.html > SCP: http://camel.apache.org/jsch.html > > > So just thinking loud: > > from("file:mydirectory?sendEmptyMessageWhenIdle=true") > .choice() > .when( simple("${body} == null") ) > > .to("smtps:user@mailhost?password=secret&to=m...@mail.org&subject=Upload-finis > hed") > .otherwise() > .to("scp://scp.host.org/dir?username=me&password=secret") > ; > > > > Jan > > > >> -----Ursprüngliche Nachricht----- >> Von: SteveR [mailto:srichard...@vonage.com] >> Gesendet: Montag, 9. November 2015 18:34 >> An: users@camel.apache.org >> Betreff: Re: Integration Pattern >> >> Hi Ishada: >> >> Maybe checkout the Camel Mail Component >> <http://camel.apache.org/mail.html> >> . >> >> SteveR >> >> >> >> -- >> View this message in context: >> http://camel.465427.n5.nabble.com/Integration-Pattern- >> tp5773535p5773547.html >> Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2