I previously had php mail out immediately, now however it may be alterations in php code on-page, or proven fact that i transformed servers. Mail out like ten minutes after user register, but when time passes and restart apache it is going trough immediately after apache restart.

What configurations must i tweak for php or apache to really make it send immediately again.

P.S. this really is random problem it sometimes transmits immediately!

            $from = "mail@otherdomain.com";
            $email_address = $ex[0][Email_Address];
            $ttc = "mymail@domain.com";
            $eol = "\r\n";

            $mime_boundary = md5(time());
            $headers .= "From:".$from .$eol;
            $headers .= "Reply-To:".$from.$eol;
            $headers .= "Return-Path:".$from.$eol;
            $headers .= "Bcc:".$ttc.$eol;
            $headers .= "X-Mailer: PHP v".phpversion().$eol; 
            $headers .= "MIME-Version: 1.0".$eol;
            $headers .= "Content-Type: text/html; charset=iso-8859-1".$eol;

            if (preg_match("/gmail/",$to))
            $headers = str_replace("\r\n","\n",$headers);

            $result=mail($email_address,$subject,$mess,$headers);
            header("location:home.html");