Start a process when receiving mail

Hello,

I want to start a process when I receive a new mail.

For this, I’m using the start event “timer” and, for example, every 2 hours it will start the process, check if I have new mail and continue the process.

But I wanted to know :
Is it possible de start my process without the timer start event, by starting it after I receive a new mail ?

Thanks,
Emilien

Hi.
You can send a Throw Signal Event after you send the mail, and start your process with a Catch Signal.

Process 1 : Begin => […] => Task that send mail => event Throw Signal => […] => End
Process 2 : Start Event Catch Signal => Your Process => End

Well, if you want process start event to be triggered on email reception you may look for a solution on your mail server, for example if you are using postfix the pipe daemon may help you to trigger a script calling the web rest API.

otherwise I do’nt know how bonita could be aware that you received an email (except with that timer trick)

Cheers,

Hi,

The problem is I receive the mail from outside Bonita, so there isn’t a task that send mail.
Your answer is correct but not for my case.

I have never tested this kind of configuration but it seems that this blog post is exactly telling you how to achieve what I have in mind:

http://blog.thecodingmachine.com/content/triggering-php-script-when-your-postfix-server-receives-mail