Hi
I need help? please
In my site i have smth like newsletter system.
Logged in users can post information about their services and this information is shown in my site. I'd like to send such information (posted by users) to the mails of the other member-users of my site. I wont the system to check, let's say, every hour the state of database(if there are any new injections) and if there are new posts these ones could be sent to the other members

Hey.

To do that, you would need to start by writing the script that checks the database and sends the emails. Then you would have to have your Operating-System execute that script at a given interval.

On Unix systems, you would use Crontab to do that. On Windows you would use the Task Scheduler. Neither is all that complex, and a bit of Googling tells you all that is needed on how to use them.

Try it out. Let us know if you run into problems.

Thanks
I'll try it
If any problems hope to receive help from you all

Member Avatar for diafol

Just an addition to Atli's post (good advice, BTW):
If you're running something like cPanel, setting cronjobs is easy. However, some hosts don't provide this service as standard and you may need to contact them to set one up for you. The cronjob will just run a php script every hour.
I would look for a better solution than the built-in simple mail() function to send e-mails. This is fine for the odd request, but sending 100s of emails via this method is not recommended.

Just an addition to Atli's post (good advice, BTW):
If you're running something like cPanel, setting cronjobs is easy. However, some hosts don't provide this service as standard and you may need to contact them to set one up for you. The cronjob will just run a php script every hour.
I would look for a better solution than the built-in simple mail() function to send e-mails. This is fine for the odd request, but sending 100s of emails via this method is not recommended.

My host provides cPanel there is no problem with this
I am interested with your suggestion about mail() function to send e-mails
So, what would you suggest to use instead
Really, I also thought about it, I'd like to have smth more powerful
Thanks, for help, guys
really appreciate it

I am interested with your suggestion about mail() function to send e-mails
So, what would you suggest to use instead

You could try PHPMailer or Swift Mailer. Both are far more powerful than the built in mail() function.

I usually use PHPMailer myself.

You could try PHPMailer or Swift Mailer. Both are far more powerful than the built in mail() function.

I usually use PHPMailer myself.

I've read through PHPMailer
but now can't understand anithyng
Really liked your suggestion
please help me with starting
(explain the core features) what i need to start
(i am beginner in PHP hope you understand my situation)
P S Now i am reading tutorial in the site you suggested
Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.