Solved

setting a Cron job to Email users from database monthly

Posted on 2014-11-13
2
101 Views
Last Modified: 2014-12-18
I'm looking for a way to email users within a database using PHP. I have never had to do this before so I new to this.

Any help would be greatly appreciated.

Ta Adam
0
Comment
Question by:Geektank
2 Comments
 
LVL 11

Expert Comment

by:Radek Baranowski
ID: 40439925
what do you have at hand ? own machine with php and mysql ? rented cloud server? hosting offering giving you access to php and mysql ?

basically what you need to do is to build php app which will contain
- code to query database for emails
- code to invoke sendmail() properly (or other php mailing function, which is available on your server) in some kind of loop going over the email set acquired from the database
- cron job set up accordingly to run your code once a month. if you have your own machine you can set up standard cron/windows scheduler job, if you are using some kind of hosting, you also should have access to cron setup, ehre you will give the name of the function or URL to invoke once a month to trigger your above function

that's a rought sketch, I know, but I'm not sure what do you have and whagt you can use, also what is you php level :)

cheers, hope this helps!
0
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 40444428
This article has some "getting started" resources for anyone new to PHP and MySQL.
http://www.experts-exchange.com/Programming/Languages/Scripting/PHP/A_11769-And-by-the-way-I-am-new-to-PHP.html
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
Creating and Managing Databases with phpMyAdmin in cPanel.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
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 …

758 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

17 Experts available now in Live!

Get 1:1 Help Now