Daniela wrote:I've seen a lot of people asking how to setup PHPlist to send e-mail automatically, especially when their databases are big (like mine 68,000) or their hosts does not allow them to send more than a couple of e-mails an hour.
I'll try to explain them as simple as possible.
I organized a couple of discussions, and I will like to thank
karma and
drubarth, they are definitely the best.

I hope this can get everybody working.
You can chek their original discussion at their links :
http://www.phplist.com/forums/viewtopic.php?t=2146http://www.phplist.com/forums/viewtopic.php?t=2142http://www.phplist.com/forums/viewtopic.php?p=6540#6540
Our domain is going to be called "water" (I'm using common words so they don't get confusing during the explanation).
http://www.water.comOur PHPlist installation is going to be installed in the directory "fountain"
Username : "fish" and password : "seashell"
First of all, (like most mortals) you have to install PHPlist.
On our case,we go through Fantastico and install it.
Now we have to create a file called "phplist" (without the quotes please) in the same directory as the phplist installation.
The file should contain the follwing code
#!/bin/bash
# script to run PHPlist from commandline. You may need to edit this to make it work
# with your shell environment. The following should work for Bash
# in commandline mode, access is restricted to users who are listed in the config file
# check README.commandline for more info
# identify the config file for your installation
CONFIG=/home/water/public_html/fountain/config/config.php
export CONFIG
# alternatively you can use -c <path> on the commandline
# run the PHPlist index file with all parameters passed to this script
/usr/bin/php /home/water/public_html/fountain/admin/index.php $*
Copy and paste it as it is, but remember to replace the domain, directory, user, password, etc. Double check there are no spaces or enter after the last character.
One this is completed, now we have to edit a file named "config.php" which is located in /public_html/fountain/config/
Check that the following line looks like this :
define ("MANUALLY_PROCESS_QUEUE",1);And this line:
define("MAILQUEUE_BATCH_SIZE",0);Now look for the following lines
# define the length of one batch processing period, in seconds (3600 is an hour)
define("MAILQUEUE_BATCH_PERIOD",60);and add the following line after it:
# Throttle sending messages; indicates the number of milliseconds to pause
# between each message (millisecond is one-millionth of a second)
define("MAILQUEUE_PROCESSING_THROTTLE",2000000); This means is going to send an e-mail every 2 secconds.
Now look for the file "processqueue.php" in the directory /public_html/fountain/admin/
Find the following line:
output("Sending $messageid to $useremail");
sendEmail($messageid,$useremail,$userhash,$htmlpref,$rssitems); and add the following just after it
usleep(MAILQUEUE_PROCESSING_THROTTLE);Save the file.
We are almost done. Just hang on a little.
Now lets go to cron jobs.
You just have to sent this up once, the day and hour you want the queue to start to be processed.
The command should look like this
php /home/water/public_html/fountain/admin/index.php page=processqueue login=fish password=seashellNow relax, prepare you message, queue it, and just watch it work.
By the way don't hit the process queue that you have on the phplist homepage, just forget about that link.
By the way, just let me know if it worked.