mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/17490] Remove name handling for mails on windows
PHPBB-17490
This commit is contained in:
parent
8dbe499e3d
commit
d5717b541e
2 changed files with 2 additions and 12 deletions
|
@ -146,10 +146,7 @@ class email extends base
|
|||
return;
|
||||
}
|
||||
|
||||
// If empty sendmail_path on windows, PHP changes the to line
|
||||
$windows_empty_sendmail_path = !$this->config['smtp_delivery'] && DIRECTORY_SEPARATOR == '\\';
|
||||
|
||||
$to = new Address($address, $windows_empty_sendmail_path ? '' : trim($realname));
|
||||
$to = new Address($address, trim($realname));
|
||||
$this->email->getTo() ? $this->email->addTo($to) : $this->email->to($to);
|
||||
}
|
||||
|
||||
|
|
|
@ -277,14 +277,7 @@ class phpbb_messenger_method_email_test extends \phpbb_test_case
|
|||
// Valid address with name
|
||||
$this->method_email->to('bar@foo.com', 'Bar Foo');
|
||||
$this->assertEquals('bar@foo.com', $email->getTo()[1]->getAddress());
|
||||
if (DIRECTORY_SEPARATOR == '\\')
|
||||
{
|
||||
$this->assertEmpty($email->getTo()[1]->getName());
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->assertEquals('Bar Foo', $email->getTo()[1]->getName());
|
||||
}
|
||||
$this->assertEquals('Bar Foo', $email->getTo()[1]->getName());
|
||||
}
|
||||
|
||||
public function test_cc()
|
||||
|
|
Loading…
Add table
Reference in a new issue