0

I have a MySQL database that has a list of items which gets updated everyday. The database is truncated everyday and filled back with the recent posts. After it is filled out, I need an automatic system that will send out the emails to users who have provided certain keyword. I have a search query in place that will search through those posts, but I cannot figure out the email alert part. I just want to make something similar to a new job alert...

What could be the potential tools that I can use to accomplish this? Currently all my website is in php. Thanks!!

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by s0bigg
1

If your web host supports Cron (most Linux hosts do)) then you need to set up a PHP job to select the records and do the emailing and schedule it using Cron. Your web host should be able to provide you with info on how to set it up but it is quite straightforward. If you are running on a Windows host, they should have an equivalent facility.

To do the mailing, you can build it yourself using the PHP mail command or you can use a library that makes it a bit easier (especially if you are sending attachments). More info on that here.

Votes + Comments
useful post
0

Thanks for your help. Yes, I do use cron jobs for other tasks and I see that as a possibility. I am now facing an error with the mail command. Let me put it here for your review. Thanks again..

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.