jitensuthar27
New Member
- Messages
- 4
- Reaction score
- 0
- Points
- 0
Hey guys,
First off, x10hosting, your free hosting service is absolutely amazing considering it's free. I have not seen so many features and advanced functionality in any other free hosting provider, so I really appreciate what you guys are doing.
On to my problem:
I have PHPList set up and running so it sends mail through my gmail account (SMTP).
If I manually process the queue (i.e. hit the "Process Queue" link), then all works well and the emails are sent out/received.
However, when I set up a cron job to process the queue every 5 minutes, it doesn't work.
I've actually scrutinized the code for PHPList, which uses PHPMailer to send out the emails via SMTP.
I've also isolated the issue to a timeout from fsockopen(). So basically, when called from a cron job, it is unable to connect to gmail's SMTP server. Normally, I'd look for solutions of port problems, coding errors, etc. However, the odd thing is that is works perfectly OK when I process through the PHPList interface.
So I guess my question is, what is it about the cron job that's causing fsockopen() to timeout? It has to be something with the fact that I'm calling processqueue from a cron job seeing as it works from the PHPList interface.
Perhaps I'm overlooking something critical here, but any/all help will be greatly appreciated. Thanks in advance!
For the record, here is the cron job I'm using:
First off, x10hosting, your free hosting service is absolutely amazing considering it's free. I have not seen so many features and advanced functionality in any other free hosting provider, so I really appreciate what you guys are doing.
On to my problem:
I have PHPList set up and running so it sends mail through my gmail account (SMTP).
If I manually process the queue (i.e. hit the "Process Queue" link), then all works well and the emails are sent out/received.
However, when I set up a cron job to process the queue every 5 minutes, it doesn't work.
I've actually scrutinized the code for PHPList, which uses PHPMailer to send out the emails via SMTP.
I've also isolated the issue to a timeout from fsockopen(). So basically, when called from a cron job, it is unable to connect to gmail's SMTP server. Normally, I'd look for solutions of port problems, coding errors, etc. However, the odd thing is that is works perfectly OK when I process through the PHPList interface.
So I guess my question is, what is it about the cron job that's causing fsockopen() to timeout? It has to be something with the fact that I'm calling processqueue from a cron job seeing as it works from the PHPList interface.
Perhaps I'm overlooking something critical here, but any/all help will be greatly appreciated. Thanks in advance!
For the record, here is the cron job I'm using:
/usr/local/bin/php -c /home/myusername/php.ini -q /home/myusername/public_html/lists/admin/index.php -p processqueue >> /home/myusername/cronlogs/process_listserv.txt
Last edited: