Log in

View Full Version : PHP Email / Response Verification



VitaminWater
05-25-2009, 04:40 AM
I am trying to start up a site in which i let people respond to questions that i post without any sort of registration. However, i would still like to moderate the answers that are posted and added to the database.
So far, i have managed to have an email sent to myself every time someone posts a response. From there, is it possible for me to respond to that email with a simple "Yes", or "No" and depending of which response it is, THEN post the response, or throw it out.
Another add on i would love for this is if it could alternate between two email addresses, to have two people check them.

Is something like this possible or am i barking up the wrong tree?
Any advice is appreciated, thanks!

forum_amnesiac
05-25-2009, 02:59 PM
You would need to get the email address of the responder and store this with the response.

You could then send an email Yes or No using this email address and depending on the response add/change status of the response or delete it.

If you want to alternate email addresses you could have a table of checkers email addresses with a field/flag that indicates who should be the next checker.

Your email program can look at this field to decide who to send the email to and set the flag to another email address.

VitaminWater
05-25-2009, 03:45 PM
For some reason i cant access my server currently, but i think my issue will be the following..
When my site sends out an email to moderators, where will the email COME from?
And when the moderator responds to the email, how can i take the content (ie yes, no) out of the email?

forum_amnesiac
05-26-2009, 08:55 AM
I don't fully understand your question about where will the email come from.

When you create the email you can also do the following:


$mailheaders = "From: $email_address1 <> \n";
$mailheaders .= "Reply-To: $email_address2\n\n";

mail($myemail, $subject, $message , $mailheaders);

$email_address1 & $email_address2 can be the same or hard coded, ie in ""

As to your second question, it depends on what they will use to respond, if by using the 'reply' function of their email or by a script. If by a script you can control what goes into the email.