Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there such things as Email Hooks?

Tags:

email

ruby

gmail

After hearing about git commit hooks, I was thinking maybe there are such things as email hooks...

Is it possible for me to build a program that says "hey, you just received an email, now run this ruby script"? Something like a GMail Web Hook. Is there anything out there like that? I mean I could build a cron thing that checked my email all the time, but maybe there's a more formal way.

Looking for an online email system to do this with, not say my Mac Mail.

like image 242
Lance Avatar asked Apr 25 '10 05:04

Lance


1 Answers

You can try smtp2web. It basically consists of a SMTP daemon that maps incoming email to HTTP urls. Then, you can run the server-side code of your choice on those URLs. This is just one way to approach the problem. It's designed particularly for use with Google App Engine.

You can either run your own instance, or just sign up for mapping (e.g. [email protected] -> http://viatropos.com) and forward your gmail account to that. Then, you would run a HTTP server at viatropos.com.

EDIT: I also found Astrotrain, which is similar but written in Ruby.

like image 69
Matthew Flaschen Avatar answered Sep 23 '22 13:09

Matthew Flaschen