[prev in list] [next in list] [prev in thread] [next in thread]
List: pear-doc
Subject: [PEAR-DOC] [PEAR-BUG] Bug #3301 [NEW]: Mail can not be sent from CLI
From: "tchoudinov at yahoo dot com" <pear-doc () lists ! php ! net>
Date: 2005-01-26 15:46:16
Message-ID: bug-3301 () pear ! php ! net
[Download RAW message or body]
From: tchoudinov at yahoo dot com
Operating system: Windows2000 server SP4
PHP version: 4.3.9
Package: Documentation
Bug Type: Bug
Bug description: Mail can not be sent from CLI
Description:
------------
When using Mail_SMTP in command line environment class does not send mails
at all. Send() function reports
"unable to authenticate to smtp server"
And a couple of notices:
Notice: Array to string conversion in C:\php\pear\Net\SMTP.php on line
365
Notice: Array to string conversion in C:\php\pear\Net\SMTP.php on line
363
The same script in WEB environment (either Apache or IIS) works just fine.
Reproduce code:
---------------
$recipients = 'tchoudinov@yahoo.com';
$headers['From'] = 'mikhail@adstate.com';
$headers['To'] = 'tchoudinov@yahoo.com';
$headers['Subject'] = 'Test message YY';
$body = 'Test message BB';
//fill an array with parameters
$params["host"] = MAIL_SMTP_HOST; //The server to connect.
$params["port"] = MAIL_SMTP_PORT; //The port to connect.
$params["auth"] = MAIL_SMTP_AUTH; //Whether or not to use SMTP
authentication.
$params["username"] = MAIL_SMTP_USERNAME; //The username to use for SMTP
authentication.
$params["password"] = MAIL_SMTP_PASSWORD; //The password to use for SMTP
authenticat
// Create the mail object using the Mail::factory method
$mail_object =& Mail::factory('smtp', $params);
$Result = $mail_object->send($recipients, $headers, $body);
echo($Result->getMessage());
Expected result:
----------------
We run the script from command line, but mail must be sent.
Actual result:
--------------
Script repotrs about errors to command line:
Notice: Array to string conversion in C:\php\pear\Net\SMTP.php on line
363
Notice: Array to string conversion in C:\php\pear\Net\SMTP.php on line
365
unable to authenticate to smtp server
--
Edit bug report at http://pear.php.net/bugs/bug.php?id=3301&edit=1
--
--
PEAR Documentation List Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic