I created a simple mail system that resembles the following:
$from = 'me < me@me.com >'; $to = 'you < you@you.com >'; $subject = 'subject'; $body = 'body'; $host = 'www.me.com'; $headers = array('From' => $from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::Factory('smtp', array('host' => $host, 'auth' => true, 'username' => 'username', 'password' => 'password')); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { throw new Exception('emailException'); }
When I try to run the script, however the browser (chrome) hangs indefinitely. An exception is excluded, not a single error page displayed by the browser just sits and waits for a response (more than 12 minutes, I left it longer).
My actual program is a little different (the code is enclosed in a function with the information passed as parameters). I used static debugging and confirmed that the parameters that are passed are correct, however it just never leads to errors, so I canβt even check the error information in $ mail.
Does anyone know how I should debug this?
Refresh . I can confirm the page freezes when calling $ smtp-> send (...)
source share