Re: [PHP] email processing

2004-12-14 Thread Richard Lynch
adwin wijaya wrote:
> I want to create a system to process the email that coming. For example,
> I send a confirmation email to our client and they just simply reply the
> email that we send to them to verify. The problem I got, I dont know how
> to process the email that coming to our mailbox and process the message
> inside with PHP.
>
> can someone recommend me a PHP class that has been created for handling
> this task ?

http://phpclasses.org might have one.

You'll want to look into 'smrsh' and some sendmail documentation for how
to get the email to the PHP script in the first place, if you want this to
happen the instant the email comes in.

If you can wait a minute or two longer per email, you can use
http://php.net/imap to open up and read email and then process them as you
see fit.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] email processing

2004-12-13 Thread adwin wijaya
Hi all :)
I want to create a system to process the email that coming. For example, 
I send a confirmation email to our client and they just simply reply the 
email that we send to them to verify. The problem I got, I dont know how 
to process the email that coming to our mailbox and process the message 
inside with PHP.

can someone recommend me a PHP class that has been created for handling 
this task ?

--
===
Best Regards
Adwin Wijaya
www.kuya-kuya.net
www.e-rhema.net
===
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] email processing

2004-12-13 Thread David Green
Hi Adwin,
I don't know if this'll help you but the way I've done it on my site is 
to send out a confirmation email with a link the user needs to follow to 
confirm. The link ends with two GET variables, one being the username 
and one being a unique number created for their account at time of 
registration.
Eg xxx.org/verify.php?username=monkey&id=1D21xepFkk465

When the link is followed, the php page 'verify.php' includes something 
a little like this

//***
$query = "SELECT * FROM members WHERE username='$_GET[username]' AND 
id='$_GET[id]'";
$result = mysql_query($query) or die();
$num_results = mysql_num_rows($result);

if ($num_results == "1")
{
   // Set authorisation to yes
   // Send email / Display confirmation message
}
else
{
   // Display failure message
}
***//
I'm sure there are better ways of doing it than this but I find this 
works effectively for what I need.
Also, you can give the recipient an easy way to unregister if someone 
has added  them to your databse against their wishes through either a 
switch function or a separate page

eg:
To confirm, click here: .org/verify.php?action=confirm&user=&id=
To remove yourself, click here: 
...org/verify.php?Action=remove&user=&id=

---
switch ($action)
{
   case remove :
   // MySQL remove
  
   case confirm :
   // MySQL confirm

OR
To confirm, org/confirm.php?username=&id=
To remove, org/remove.php?username=&id=
Hope this helps?
adwin wijaya wrote:
Hi all :)
I want to create a system to process the email that coming. For 
example, I send a confirmation email to our client and they just 
simply reply the email that we send to them to verify. The problem I 
got, I dont know how to process the email that coming to our mailbox 
and process the message inside with PHP.

can someone recommend me a PHP class that has been created for 
handling this task ?


--
--
David Green
Information Centre, Central Science Laboratory
Sand Hutton, York, YO41 1LZ
Phone:  +44 (0)1904 462388 (GTN: 5129 2388)
Fax:+44 (0)1904 462111
E-Mail: [EMAIL PROTECTED]
--
CSL email disclaimer: http://www.csl.gov.uk/email.htm
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php