From an email to Form input

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ajones
Forum Newbie
Posts: 2
Joined: Tue Apr 13, 2004 5:03 pm

From an email to Form input

Post by ajones »

Okay, here's my problem:

My cellular provider doesn't support email forwarding for text messaging. Okay, that sucks. But they do offer web based text messaging from their site. They're stupid and use ASP, but here is the HTML form used:

Code: Select all

<form name="disclaimer" action="http://mycricket.com/text/SendTo_SMS_System.asp?Step=2" method="post">
	<input type="hidden" name="from" value="Proteus_IM">
	Your Message: <input type="textfield" name="msg" value="">
	<input type="hidden" name="email_from" value="Proteus IM">
	<input type="hidden" name="cricket_phone_number" value="4795224904">
	<input type="submit" name="Submit" value="Send"> 
</form>
So, what I want to do, is setup an email address, like mycell@mydomain.com and have it sent to a script on my server that will just spit the body of the email into the "msg" text area. Anyone have a clue as to how I can do this? I'm good at concepts but not code because I'm a newbie!
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

Have a mail sendt to the server that spits out the body into the message text area? I I understood correctly, I'm don't think this can be done very easy.

I can think of a script that run checks against the POP/IMAP mail server, fetches the mail and does whatever to it to find the body-msg. But you likely need that timed, so a cronjob could/should be used to constantly check the above mentioned mailbox...
And if this is working, you still need to find away to send the text to that form (likely using php's cURL) so it gets sendt...

Perhaps we should move this into the "Work wanted done" part of the forum?
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

http://www.evolt.org/article/Incoming_M ... index.html might point you in the right direction too.
ajones
Forum Newbie
Posts: 2
Joined: Tue Apr 13, 2004 5:03 pm

Post by ajones »

I'm a newbie, didn't know where this went, thanks for pointing me in the right direction guys!
Post Reply