Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 3.137.189.197
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : test_Bug_GH26.phpt
--TEST--
Bug GH-26  Backward slash is getting added in headers
--SKIPIF--
--FILE--
<?php

require_once('Mail/mime.php');

$mail_mime = new Mail_mime("\n");

$from = '"George B@@Z"<george@cort.org.au>';
$to = <<<EOT
"austin test"<austinn@cort.org>,<reno@cort.org>,t@mail.com
EOT;
$subject = "Test mime";
$mailbody = "hello world";

$mail_mime->setTxtBody($mailbody);
$mail_mime->setHTMLBody($mailbody);
$mail_mime->setSubject($subject);
$mail_mime->setFrom($from);

$body = $mail_mime->get();

$extra_headers = array();
$extra_headers["To"] = $to;

$arr_hdrs = $mail_mime->headers($extra_headers);

echo $arr_hdrs['From'] . "\n" . $arr_hdrs['To'];

--EXPECT--
"George B@@Z" <george@cort.org.au>
"austin test" <austinn@cort.org>, <reno@cort.org>, t@mail.com
© 2025 GrazzMean