Solved

Send emails automatically every week

Posted on 2008-06-26
2
216 Views
Last Modified: 2013-12-13
I am using WAMP. In my database I have a date field with stores dates as this
bend_distroct
6-30-2008
12-31-2008
12-1-2008
12-1-2008
5-30-2008
6-30-2008
2-27-2009
2-26-2009
12-1-2008
2-27-2008
2-11-2009
2-11-2008
2-11-2009
2-11-2008
5-1-2008
5-1-2009
5-30-2008
5-1-2009
5-1-2008
12-1-2008
6-1-2008
6-30-2008
11-9-2007
5-30-2008

What I want to do is send email that has a date which is one week from today. And I want to send all the records belonging to that date.
I have already setup task which will run the script everyday. I need the script.
Thanks
0
Comment
Question by:syedasimmeesaq
2 Comments
 
LVL 6

Accepted Solution

by:
mmarth earned 250 total points
ID: 21880448
$query="SELECT * FROM Database WHERE (TO_DAYS(now())=TO_DAYS(adddate(bend_distroct,7))) ";
0
 
LVL 3

Assisted Solution

by:Bivek-jos
Bivek-jos earned 250 total points
ID: 21882055
$query="SELECT * FROM Database WHERE (TO_DAYS(now())=TO_DAYS(adddate(bend_distroct,7))) ";

Write a script to send mail. (including the above query)

Now you need to schedule a "cron job"() to be run daily.

"Cron job" will run your script on daily basis.

If you don't know about "cron job" then search for it in google.Or search it in your cpannel or whm guide.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now