Solved

Send emails automatically every week

Posted on 2008-06-26
2
219 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PHP not parsing ' character 12 46
parse url to form? 7 25
Get a subdirectory name from a url 5 27
issue with DB import 1 18
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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 …

837 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