--TEST-- Bug #72964 (White space not unfolded for CC/Bcc headers) --SKIPIF-- --INI-- SMTP=localhost smtp_port=25 sendmail_from=from@example.com --FILE-- $users[0], 'cc2' => $users[1]]; $bcc = ['bcc1' => $users[2], 'bcc2' => $users[3]]; $subject = 'mail_bug72964'; $message = 'hello'; $headers = "From: {$from}\r\n" . "Cc: {$cc['cc1']},\r\n\t{$cc['cc2']}\r\n" . "Bcc: {$bcc['bcc1']},\r\n {$bcc['bcc2']}\r\n"; $res = mail($to, $subject, $message, $headers); if ($res !== true) { die("Unable to send the email.\n"); } echo "Email sent.\n"; foreach ([['to' => $to], $cc, $bcc] as $mailAddresses) { foreach ($mailAddresses as $recipient => $mailAddress) { $mailBox = MailBox::login($mailAddress); $mail = $mailBox->getMailsBySubject($subject); $mailBox->logout(); if ($mail->isAsExpected($from, $to, $subject, $message)) { echo "Found the email. {$recipient} received.\n"; } } } ?> --CLEAN-- deleteMailsBySubject($subject); $mailBox->logout(); } ?> --EXPECT-- Email sent. Found the email. to received. Found the email. cc1 received. Found the email. cc2 received. Found the email. bcc1 received. Found the email. bcc2 received.