[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Send emails automatically every week

Posted on 2008-06-26
2
Medium Priority
?
225 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Accepted Solution

by:
mmarth earned 1000 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 1000 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 Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
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 dynamically set the form action using jQuery.
Suggested Courses

650 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