Solved

setting a Cron job to Email users from database monthly

Posted on 2014-11-13
2
117 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
[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 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 110

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying 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
$_SERVER Variable question 31 56
Google Dork query 7 66
How to use session variables in php? 22 51
How do i use the await event in php echo 5 19
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
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…

733 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