Automatically Send Email

lelandstrott

New Member
Messages
1
Reaction score
0
Points
0
Hello to all,

Is it possible in php to automatically send an email out on someone's birthday?

I mean to say without anyone clicking a button to do so? If so, please let me know.

Your help much appreciated .

Thanks
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
You'd have to have all the user's birthdays in a database. Then make a script that checks for all birthdays that are on todays date (using the date function). It would then send said users an email for their birthday.

You could run a cron job everyday to check the database (basically run the script).
 

ejweb

New Member
Messages
64
Reaction score
0
Points
0
I think one of the big issues including running a "script" is what process is going to run or execute that "script" or a ".php" web page. For example; I wanted to send an email out to all focals who have outstanding requests that are over five days old. If the website is heavily used, I could create a .php or .asp scripting page to check the date difference because I'll know someone will go to that page. But as you pointed out; you don't want to do this as do I. So, since I was dealing with Database Admins on a SQL server, I had to create what is called a "DTS" (Data Transformation Service) package to run that web page or "script" and have the DBA Admin "schedule" the time (ie; every day at midnight) when to run that "package" so the script will executed to do the outstanding date comparison - similar to what you may want to do. You may need to ask for assistance from a "DBA" or some kind of Web/DB administrator...
 
Last edited:
Top