pedjasmek Posted March 30, 2008 Share Posted March 30, 2008 I'm trying to send an email using this code: <?php require('Mail.php'); $from = "Sandra Sender <pedja84@sbb.co.yu>"; $to = "Ramona Recipient <pedjasmek@gmail.com>"; $subject = "Hi!"; $body = "Hi,\n\nHow are you?"; $host = "mail.sbb.co.yu"; $username = "pedja84"; $password = "*"; $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)) { echo("<p>" . $mail->getMessage() . "</p>"); } else { echo("<p>Message successfully sent!</p>"); } ?> but I don't get neither "Message successfully sent!" message nor anything else.Instead of that Windows reports that Apache server has stopped working.What should I do? Quote Link to comment Share on other sites More sharing options...
trq Posted March 30, 2008 Share Posted March 30, 2008 What should I do? I'd start by checking your apache logs. Quote Link to comment Share on other sites More sharing options...
pedjasmek Posted March 30, 2008 Author Share Posted March 30, 2008 Error log goes like this: Problem signature: Problem Event Name: APPCRASH Application Name: apache.exe Application Version: 2.2.8.0 Application Timestamp: 47904924 Fault Module Name: ntdll.dll Fault Module Version: 6.0.6001.18000 Fault Module Timestamp: 4791a7a6 Exception Code: c00000fd Exception Offset: 00047dc8 OS Version: 6.0.6001.2.1.0.768.3 Locale ID: 1033 Additional Information 1: bdca Additional Information 2: cee7f8308cdbfe3677c45c2c67d0b5c8 Additional Information 3: 9123 Additional Information 4: 80d18c7d5e9e5b7e056e34c6e6304ff7 Quote Link to comment Share on other sites More sharing options...
eddierosenthal Posted March 30, 2008 Share Posted March 30, 2008 that looks more like an os log than an apache log. look in where your installed apache, then the sub directory called logs, then the error file. Quote Link to comment Share on other sites More sharing options...
trq Posted March 30, 2008 Share Posted March 30, 2008 Sorry, that doesn't look like the apache error log. You'll need to look in your httpd.conf file to find the location of the apache logs. Quote Link to comment Share on other sites More sharing options...
pedjasmek Posted March 30, 2008 Author Share Posted March 30, 2008 These lines were written in the errro.log file the last time I run the script: [sun Mar 30 18:34:36 2008] [notice] Parent: child process exited with status 255 -- Restarting. [sun Mar 30 18:34:48 2008] [notice] Apache/2.2.8 (Win32) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8g mod_autoindex_color PHP/5.2.5 configured -- resuming normal operations [sun Mar 30 18:34:48 2008] [notice] Server built: Jan 18 2008 00:37:19 [sun Mar 30 18:34:48 2008] [notice] Parent: Created child process 2292 [sun Mar 30 18:34:53 2008] [notice] Child 2292: Child process is running [sun Mar 30 18:34:53 2008] [notice] Child 2292: Acquired the start mutex. [sun Mar 30 18:34:53 2008] [notice] Child 2292: Starting 250 worker threads. [sun Mar 30 18:34:53 2008] [notice] Child 2292: Starting thread to listen on port 443. [sun Mar 30 18:34:53 2008] [notice] Child 2292: Starting thread to listen on port 80. Quote Link to comment Share on other sites More sharing options...
eddierosenthal Posted March 30, 2008 Share Posted March 30, 2008 That apache log is fine, no errors. perhaps there is another log that has more relevant errors. with pear installed , is there some place pear puts its errors? according to the first lookup i did on mail::factory you might have used require_once("mai.php") to avoid multiple inclusions. also host is usually localhost. i think the smtp connection is timing out, and only appears that apache has stopped. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.