php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3455 Mail() doesn't accept multiple recipients.
Submitted: 2000-02-11 10:01 UTC Modified: 2000-07-26 12:41 UTC
From: bjarne dot ingelsson at enator dot se Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.14 OS: WinNT4 SP6
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bjarne dot ingelsson at enator dot se
New email:
PHP Version: OS:

 

 [2000-02-11 10:01 UTC] bjarne dot ingelsson at enator dot se
// This is a PHP4b3 problem             //
// No option for this in the dropdown...//

Mail() doesn't accept multiple recipients.

Instead of sending every recipient in separate SMTP-RECPT TO: messages , they are sent in just one.
The mailserver respond with "bad address".

The recipients in "Cc:" does not get any mail at all...

Here is a code snippet:

$To = "bjarne.ingelsson@enator.se,bjarne@shamrocksoftware.com";
$Cc = "leif@shamrocksoftware.com";
$From = "tsa4400@enator.se";
$ReplyTo = "bjarne.ingelsson@enator.se";
$ReportTo = "bjarne.ingelsson@enator.se";

// Mail Subject
$Subject = "Fault Report - " . $txtSubject;

// Additional headers...
$AddHeaders = "Cc: " . $Cc . "\n";
$AddHeaders .= "From: " . $From . "\n";
$AddHeaders .= "MIME-Version: 1.0\n";		
$AddHeaders .= "Content-Type: text/html; charset=iso-8859-1\n";	
$AddHeaders .= "Content-Transfer-Encoding: 8bit\n"; $AddHeaders .= "X-Non-Delivery-Report-Requested: True\n"; $AddHeaders .= "X-Report-To: " . $ReportTo . "\n"; $AddHeaders .= "X-Mailer: PHP" . phpversion();		

mail ($To,$Subject,$MailBody,$AddHeaders);


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-05-21 18:39 UTC] jimw at cvs dot php dot net
someone probably needs to update win32/sendmail.c in PHP4 with
the latest from PHP3, which contains code to do this.
 [2000-07-26 12:41 UTC] hholzgra@php.net
this has been done
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 06 09:01:32 2025 UTC