Languages :: PHP :: mail & php very slow - How can script ignore ? |
|||
| By: mfuerlinger |
Date: 25/09/2003 00:00:00 |
Points: 300 | Status: Answered Quality : Excellent |
|
Here is my "nut": I'm running a php script which sends mail on a linux pc. I'm testing the script within an fast intranet. Everything works fine - except the fact it takes a pretty long time (5-60 sec.) to finish the mail cmd in my php-script. My php scripts uses the system mail prog "mail" from Berkeley Distribution which I want to keep. Tested already mailing directly with a mail-prog or mailing over console - all as same user and over same servers: everything was sent in less then 1 sec. Is there a way to push the invoked mail process in the background or can I somehow ignore the waiting without changing my mail method completely ? In my php-script I use the following to start the mail process: mail($to, $subject, $mime, $headers); pls tell if you need more info mathias |
|||
| By: mfuerlinger | Date: 25/09/2003 03:39:00 | Type : Comment |
|
| could be helpfull some Logging-Information: using tail -f mail.log I recognize a delay of the log entry: "....Message accepted for delivery...." but only when the mail process is invoked by my php script. No error or abnormal messages around ... |
|||
| By: VGR | Date: 25/09/2003 07:02:00 | Type : Answer |
|
| try direct SMTP protocoling |
|||
| By: mfuerlinger | Date: 26/09/2003 03:38:00 | Type : Comment |
|
| ? can you be a bit more precise please |
|||
| By: ThG | Date: 26/09/2003 10:16:00 | Type : Comment |
|
mail() is NOT the "system mail", which is by definition the executable file /usr/bin/mail and mail() doesn't invoke /usr/bin/mail, but rather it invokes /usr/sbin/sendmail that, depending on your sendmail version, either triggers the spooling engine or tries directly to connect to the remote SMTP, thus making waiting time too long. Unfortunately this is all i know about this topic, we may look for a solution together but unfortunately i haven't got much free time nowadays. I can tell you that, given you have sendmail 8.12.x, it must be related to the sender/receiver DNS resolving.. |
|||
|
Do register to be able to answer |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








