Req #6161 [Opn->Csd]: Misleading Example in Mail documentation

From: Date: Mon, 20 Mar 2006 21:13:01 +0000
Subject: Req #6161 [Opn->Csd]: Misleading Example in Mail documentation
References: 1  Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-7694@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=6161&edit=1 ID: 6161 Updated by: arnaud@php.net Reported By: ted at qtis dot co dot nz -Status: Open +Status: Closed Id: 6161 Type: Feature/Change Request Package: Documentation Operating System: All PHP Version: Irrelevant New Comment: This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. I added an extra person in the To: header to show that the comma separated way should be used. Previous Comments: ------------------------------------------------------------------------ [2005-12-05 14:05:07] ted at qtis dot co dot nz Description: ------------ This is not urgent but it should save lots of time for people using Mail for the first time. The example stated that you can set up the $recipients array as $recipients = ('To' => 'someone@abc.com', 'Bcc' => 'another@def.com); While this is technically correct it it misleading when you try to add multiple recipients e.g. if you want to have two 'To' recipients you might think from the example that you should write $recipients['To'][] = 'to1@ghi.com'; $recipients['To'][] = 'to2@xyz.com'; But this does not work becuase Mail implodes the $recipients array and does not interpret the 'To', 'Cc', or 'Bcc' keys in the array. It would probably me clearer just to use an example like $recipients[] = 'someone@abc.com'; $recipients[] = 'another@def.com'; Test script: --------------- N/A Expected result: ---------------- N/A Actual result: -------------- N/A ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=6161&edit=1

« previous php.pear.doc (#7694) next »