Re: Mail with smtp

From: Date: Mon, 28 Jul 2003 19:08:35 +0000
Subject: Re: Mail with smtp
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-6872@lists.php.net to get a copy of this message
Hello, I am trying to use the Mail module and I am having problems. Here is my code: [code] <?php include('Mail.php'); $recipients = 'devin@synapticvision.com'; $headers['From'] = 'devin@synapticvision.com'; $headers['To'] = 'devin@synapticvision.com'; $headers['Subject'] = 'Test message'; $body = 'Test message'; $param["host"] = "localhost"; // Create the mail object using the Mail::factory method $mail_object = &Mail::factory('smtp ', $params); $return = $mail_object->send($recipients, $headers, $body); echo "<HTML><head><title>Hello Devin</title></head><body bgcolor='red'>"; echo "$return"; echo "</body></html>"; ?> [\code] This is what I get in my browser: Fatal error: Call to undefined function: send() in /var/www/html/php/newmail.php on line 25 What gives??? I am following the code example exactly! I have it installed. Please help, I need to get this finished real soon. Thanks -- Devin Whalen Programmer Synaptic Vision Inc Phone-(416) 539-0801 Fax- (416) 539-8280 1179A King St. West Toronto, Ontario Suite 309 M6K 3C5 Home-(416) 653-3982

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