crons, mails, and php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
user___
Forum Contributor
Posts: 297
Joined: Tue Dec 05, 2006 3:05 pm

crons, mails, and php

Post by user___ »

Hi guys,
I have to send mass mails to all the users of our site but I am not sure whether it is a good idea to do it by using a crontab because I just execute the file do not I? How can I send about seven thousand mails by avoiding being blacklisted. If it is possible please give me more details on the cron stuff because I am not very aware of it.
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post by aaronhall »

Talk to your hosting provider. Your best bet is to use cron to call a script that sends only a small chunk of emails at a time throughout the day, rather than looping through 7000 email addresses in one go.

Your hosting provider should have an interface to cron via a control panel. If not, ask them how you can access the crontab file. The rest is up to you.

Bonus: Swift mailer is much better than using mail() a couple thousand times (and faster)
Post Reply