Solved

Send emails automatically every week

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
This article discusses how to create an extensible mechanism for linked drop downs.
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…
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…

732 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