PHP Mail() Time Delay - Cron Job -

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
adbox
Forum Newbie
Posts: 1
Joined: Fri Sep 19, 2008 2:08 pm

PHP Mail() Time Delay - Cron Job -

Post by adbox »

Hello,

We use the mail() php function to handle our form emails for customer service. The problem is that it takes 15-25 minutes to receive an email after it has been sent. This hurts our customer service.

I would like to set the interval to send out every 3 minutes, and I believe I can do this through a cron job, although I have never operated the cron job section of a control panel.

Or maybe this problem can be handled some other way. I have found little to no documentation on this issue on the internet so far. I appreciate all and any help,
Adbox
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: PHP Mail() Time Delay - Cron Job -

Post by josh »

When you call mail the message is directly spooled with your MTA, your MTA has it's own internal queue scheduler.. much like how cron would automate your linux tasks. You'll probably have to mess with the settings of your MTA ( sendmail most likely ) and maybe check the log files, and spool to see whats happening
Post Reply