I have the following code <?php echo date('H:i:s'); $headers = 'From: XXXXXXX' . "\r\n" ; mail(XXXXXX,'test','test',$headers); echo date('H:i:s'); ?> PHP: It takes exactly 1 minute to send this simple email. Does anyone have an idea where the problem could lie and how I can fix it? Thanks
It's most likely your SMTP server used for sending mail that is the cause of the slight delay. Couldn't be sure without viewing server stats but it's quite possible.
Do you mean it takes 1 minute from when you click the button to send the email to the time the page processes it and says it's been sent, or it takes 1 minute from when you click "send" to when it arrives where it has being sent to? Is it being sent to a local address on an email server or an external address at another location? What's being asked is, is exactly what is taking 1 minute? What do you mean by sent? and where is "sent"?
If you look at my script you can see that there is no button. I simply have a script which outputs time and date, sends a test email to an email address that is on a different server and finally output the date and time again. and when I compare those times it is about 1 minute +/- a few seconds
Seems you ahve problem with your SMTP server, thats why its on queue and processing little bit lately. It also depends on server firewall, mail scanner, memory and total account hosted on the server etc.
ok I am a complete amateur on these things. How can I check the SMTP stuff out? The server is located in house and there is only some internal webbased system on it. Nothing else. So not overloaded ever.