• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

trigger event/program when a new email is received

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Is there a way to trigger an event/program when on receiving a new email..

The use case is something like this :

Scan for the messages in inbox and check the subject line. If subject line matches, read further.

I can be done using a scheduler ..that's triggering this every 30 mins or so. Every 30 mins scheduler will run and scan for new emails and check for the subject line..

But I just wanted to check if there is a way to do this on receiving a new email(instead of relying on scheduler) ?
 
Sheriff
Posts: 5555
326
IntelliJ IDE Python Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Aparna, welcome back to the Ranch!

Do you have a program written already that can retrieve emails from your email server? Does your email server support Push email?
 
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are running on Unix, there is something called "procmail" that does exactly this. I used it about 6 years ago to trigger a file build of something...Whenever the account got an email with a specific subject string, it would fire off a perl script that built the file they wanted and emailed it back to them.
 
Aparna Pillai
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I do have a program which retrieves the email ..but i do not have a dedicated SMTP server... I am using just a gmail id..my program just gets email from the gmail inbox

but looks like i'll need a smtp server if i need this feature..

reply
    Bookmark Topic Watch Topic
  • New Topic