User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » HELP:: Email Processing via PHP, mysql Page [1]  
robster
All American
3545 Posts
user info
edit post

I am trying to code up an email based communications system with an application for a friend.

Basically, here is the flow:

An email is sent to the participant with a KEY in the subject line:

From: process@server.com
To: Users_registered_emailaddress@hostx.com
Subject: GGG=XID893iIDi

The participant then can reply to that email and my server will do a check to make sure the key is valid for that user (the KEY is stored in the dbase with the users email address).

Once this check has passed, the message will be processed as desired by the application, lets just say it does a mysql INSERT into the 'Message' table.

insert into message (user_id, message_text, date) values (1, 'here is the message', '2007-12-24');

SO ==========>

How can I do this, and is it possible with a hosted solution such as dreamhost shared hosting?

12/19/2007 3:57:30 PM

evan
All American
27701 Posts
user info
edit post

yes

have the "key" be a random string you encrypt via some method with randomized seed.

use the builtin SMTP functions in php to send mail.

set up a pop3 box on your server, have it pipe mail to your php script, set up the script so it will parse the mail when it gets it in, voila.

12/19/2007 4:26:10 PM

robster
All American
3545 Posts
user info
edit post

Yeah, the only problem is that I have doubts that the shared hosting gives access to piped mail...

Im thinking I may have to set up some sort of pop3 polling with a cron job.

12/19/2007 4:33:39 PM

BigMan157
no u
103354 Posts
user info
edit post

you may want to have the key stored as a different header than the subject

that gibberish is pretty much guaranteed to end up spam filtered

12/19/2007 5:19:37 PM

evan
All American
27701 Posts
user info
edit post

if they use cpanel, you can do piped mail

and yeah, if you can't pipe it, the only other solution is a cron job

12/20/2007 5:25:27 AM

 Message Boards » Tech Talk » HELP:: Email Processing via PHP, mysql Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.39 - our disclaimer.