Bug #3455: Mail() doesn't accept multiple recipients.

From: Date: Fri, 11 Feb 2000 09:01:27 +0000
Subject: Bug #3455: Mail() doesn't accept multiple recipients.
Groups: php.dev 
Request: Send a blank email to php-dev+get-15374@lists.php.net to get a copy of this message
From: bjarne.ingelsson@enator.se Operating system: WinNT4 SP6 PHP version: 3.0.14 PHP Bug Type: Misbehaving function Bug description: Mail() doesn't accept multiple recipients. // 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);

« previous php.dev (#15374) next »