problem with mailing list

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
oboedrew
Forum Commoner
Posts: 78
Joined: Fri Feb 20, 2009 1:17 pm

problem with mailing list

Post by oboedrew »

I could use some help brainstorming here. I'm setting up a mailing list using a flat file database. When an email address is submitted through a form, it is added to a "unconfirmed subscribers" list, and an email is sent to that address with instructions for confirmation. Once the confirmation process is complete the address is removed from the "unconfirmed subscribers" list and added to a "confirmed subscribers" list. Only then does the address actually receive messages from the mailing list.

So, here's the problem. I need to set this up so that addresses are removed from the "unconfirmed subscribers" list after x number of days, so that they don't just keep piling up. I can't think of any way to do this with php. Is this even possible?

Thanks,
Drew
Paul Arnold
Forum Contributor
Posts: 141
Joined: Fri Jun 13, 2008 10:09 am
Location: Newcastle Upon Tyne

Re: problem with mailing list

Post by Paul Arnold »

You need to set up a CRON job to remove the old records.
Store the date that addresses are entered in the unconfirmed table and set the CRON job up to remove the records with a date that's older than a certain date in the past.
oboedrew
Forum Commoner
Posts: 78
Joined: Fri Feb 20, 2009 1:17 pm

Re: problem with mailing list

Post by oboedrew »

Thanks, Paul. This CRON job thing is new to me, but I just googled it and found a handful of articles, so I'll read up on it.

Cheers,
Drew
Post Reply