PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Networking » Net_SMTP » Bug #242

Multiple recipients no working through smtp

Details

Submitted2003-11-14 05:35 UTC
FromJ dot Antonio at jaruz dot com
StatusNo Feedback
PackageNet_SMTP
PHP Version4.3.3
OSLinux
Roadmaps(Not assigned)

Comments

[2003-11-14 05:35 UTC] J dot Antonio at jaruz dot com

Description:
------------
It seems having multiple recipients (either separated by coma or in an array as the documentation says) does not work when using the mail funtion in combination with smtp.

Reproduce code:
---------------
require_once 'Mail.php';
$params = array();
$params["host"] = 'mysmtp.server';
$params["port"] = '25';
$params["auth"] = TRUE;
$params["username"] = 'myuser';
$params["password"] = 'mypassword';
$headers = array();
$headers['From'] = 'Me <j.antonio@jaruz.com>';
$headers['To'] = 'j.antonio@jaruz.com';
$headers['Subject'] = 'Testing';
$recipients = 'jaruz@jaruz.com, webmaster@oaxaca.com';
$body = 'test';
$mail_object =& Mail::factory('smtp', $params);
$mail_object->send($recipients, $headers, $body);

Expected result:
----------------
No errors and I expect to to receive the e-mail.

Actual result:
--------------
An error (which depends on which smtp server is used, I tried more than three), and no e-mails ever arrive.

[2003-11-14 06:43 UTC] J dot Antonio at jaruz dot com

Moved bug from mail to net_smtp

[2003-11-14 18:45 UTC] chagenbu at php dot net

The syntax you give is invalid because, as the documentation says (which you kindly point out), you need to pass in recipients in an array.

You seem to claim that that doesn't work either, but you don't give the error messages and don't show how you're calling the code, so it's impossible to say what might be wrong.