Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto email sent every 6 months

Status
Not open for further replies.

benrob82

Programmer
Jul 28, 2005
116
GB
We have a membership system on our site and we want to be able to send an email out when the member is 6 months through their membership.

I know how I would do this in ASP i.e. setting up the datediff function from the membership start date to todays date and then generate the email, but I cant seem to be able to do this in PHP.

Does anyone know any good tutorials or examples of this. Also how would I get the script automatically each day?

Thanks
 
A recommended method for determining when a member is 6 months through a membership will depend on how you have stored your members' records.

A recommended method for running periodically running scripts without supervision depends on your run environment.

How 'bout some details?


Want the best answers? Ask the best questions! TANSTAAFL!
 
the member details are stored in a users table in a mysql database which is then accessed via SugarCRM.

What I need to do is get an automated script to run once each day to determine if there are any members who are 6 months through their membership and if they are send out an email.

 
The "run environment" question is still hanging out there, and it makes a big difference as to how you will automate the daily running of this script.

On unix-like OSes, you have the cron daemon available. On Win32, you have the Scheduled Tasks gadget.



Want the best answers? Ask the best questions! TANSTAAFL!
 
thanks for your help but I have it sorted now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top