Solved

setting a Cron job to Email users from database monthly

Posted on 2014-11-13
2
113 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 109

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo‚Ķ
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to count occurrences of each item in an array.
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.

856 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