Hi,

I am running a bouncing script for bounced emails that
updated to a database.  What I want to do is have 3
bounces before dis-allowing emails to be sent to that
user.

So I have the following tables in my db:

- Username
Username of the user
- Email
Users Email Address
- email_setting
If set to 2 (default) it will send an email to their
inbox and one to the website internal website, if set
to 1 it will send only to internal website, if set 0
it will send to inbox only.  Any other values will not
send to anything.
- emailerror
Counts the emails error that have bounced back.

This is what I would like to do... 

If an email bounces it will grab the email in the
inbox and match it to the database.  If a match is
there it will put +1 value in emailerror.  (This has
already been achieved, I have done this)

What I want to do is once the value in emailerror
reaches 3 I than want the email_setting set to -1 so
no emails get sent out.  

So If user bob had 3 bounces I'd want to grab the 3
value and reset it to 0 and change email_setting to
-1.  How could I achieve this?  I need this to apply
to all Users when they reach emailerror = 3.  I need
it to be safe and work when it reaches 3+.

I'm not familiar with grabbing a value from one table
and putting a new value in another.  So all help is
mostly appreciated.

What I have now is a bouncing script.  It grabs the
email addresses from the orginal body of an email,
runs it in a loop than puts it in a query to do a
match on my db.  If one is found it makes the updates
(emailerror = +1)  ... If no match it does nothing. 
Now I need to grab values of 3 or higher in emailerror
and reset to 0 and place a -1 value in email_setting
but not sure how to do this.

Thanks for your time.

J

http://greetings.yahoo.com.au - Yahoo! Greetings
Send your love online with Yahoo! Greetings - FREE!

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

Reply via email to