views:

71

answers:

2

Hey guys, I wanted to write something that could receive text messages and respond with data queried information from my database. I have been playing around with this and discovered that you can send/receive text messages to email addresses.

What would I need to write to have the a program to constantly check for new messages to an email address then use the message body to search a database field return a 'like' value.

As my experience in web development, I was thinking about using the rails actionmailer to to the sending, but as for receiving the messages, I didn't think that creating a webpage the constantly refreshed over and over again to check for new messages the send the response would be very efficient.

Would I need to create a program like that ran on a computer that was constantly on and did the receiving and sending?

Is there anyway to install such a program to my email providers servers so I would have the program on my computer?

Can I use my own email server running at my house to handle these actions?

Those are just some ideas of how I thought this problem could be solved. I apologize if there are too many questions involved in this problem. I was just asking if anyone could point me in the right direction or confirm any of my ideas of how to solve this.

I've used .NET, C++, Javascript, and recently Ruby on Rails to develop things in the past, but have no problem learning more languages to solve this problem.

~Thanks for any help~

A: 

Have you seen Twilio? They provide an API for sending/receiving txts. You have to pay for it, but it is relatively cheap and might be a viable option for you: http://www.twilio.com/

Ronald
+1  A: 

Most MTA's have a way to deliver an email to a program. For example, Postfix supports the pipe daemon. This would be the most straightforward technique but would require you to run your own MTA.

R Samuel Klatchko