Re: Error Info

From: Date: Thu, 19 Jun 2003 14:14:50 +0000
Subject: Re: Error Info
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-6119@lists.php.net to get a copy of this message
I'm not sure if its something I'm doing now, or something with my host. When I upload PEAR.php, Mail, and Mail_Mime, and they are in the same directory as my test script, they work fine. When I include them from /home/myuser/PEAR or from /usr/share/pear Mail::factory('mail') dies on me and the whole script stops. I have also not been able to receive an e-mail using it, granted I think there is something wrong with my server's sendmail or smtp (not sure which) because it is ungodly slow. Here is the script I am working with... <?php #include('Mail.php'); #include('Mail/mime.php'); # Database abstraction layer ini_set("include_path","/home/insyder/PEAR"); include_once("/home/insyder/PEAR/Mail.php"); include_once("/home/insyder/PEAR/Mail/mime.php"); ini_restore("include_path"); // The message $html = "<HTML><BODY><strong>Hello</strong> <br><font color=\"blue\">The following message is being sent to you as a test for the DJHeadlines.com mailing list. You have been selected by Drew to test this message. Please respond to insyder@myrealbox.com saying you received an html message and whether or not it looked blue.</font></BODY></HTML>"; // Clean up for plain text. $text = strip_tags($html); $crlf = "\n"; $hdrs = array(
             'From'    => 'insyder@myrealbox.com',
             'Subject' => 'DJHeadlines.com Test mime message',
             );
$mime = new Mail_mime($crlf); $mime->setTXTBody($text); $mime->setHTMLBody($html); $param["html_encoding"] = "7bit"; $body = $mime->get($param); $hdrs = $mime->headers($hdrs); $mail =& Mail::factory('mail'); $mail->send('insyder@myrealbox.com', $hdrs, $body); ?> Anyhelp would be appreciated. I am officially driving myself up the wall. - Stan

« previous php.pear.general (#6119) next »