I have a script processes a bunch of forms that are filled in by email addresses. Usually the script processes them instantly. But the odd time - outside of the testing environment - when live users are entering other email addresses (different domains...) I see them having to wait up to 1 minute or or more for the script to process. In times like that when I try to send the email it is even slow for me. (This is replicatable on 2 different boxes!)
I am using the mail() with sendmail on redhat 6.2
I looked at the sendmail log on one of the occurances and it started then did something 50 seconds later and then stopped then 20 seconds later sent it to all the addresses.
That's 70 seconds of wait time -oh no! Another enigma is the fact that php didn't timeout on me with a fatal error (in the ini i didn't change the default from 30s)
The only thing i can think is i have to somehow send them to a queue so the php script doesn't have to let the user "hang" while slow sendmail is trying to send out the email. (btw: i dunno how to do this hehe)
Any ideas would be extremely EXTREMELY appreciated!!!
-Carl