Remove space from email subjects
This commit is contained in:
parent
46d6ada728
commit
11c3a762b8
|
@ -98,7 +98,7 @@ class EngelsystemMailer extends Mailer
|
||||||
public function send($to, string $subject, string $body): int
|
public function send($to, string $subject, string $body): int
|
||||||
{
|
{
|
||||||
if ($this->subjectPrefix) {
|
if ($this->subjectPrefix) {
|
||||||
$subject = sprintf('[%s] %s', $this->subjectPrefix, $subject);
|
$subject = sprintf('[%s] %s', $this->subjectPrefix, trim($subject));
|
||||||
}
|
}
|
||||||
|
|
||||||
return parent::send($to, $subject, $body);
|
return parent::send($to, $subject, $body);
|
||||||
|
|
|
@ -108,7 +108,7 @@ class EngelsystemMailerTest extends TestCase
|
||||||
|
|
||||||
$this->assertEquals('Mail test', $mailer->getSubjectPrefix());
|
$this->assertEquals('Mail test', $mailer->getSubjectPrefix());
|
||||||
|
|
||||||
$return = $mailer->send('to@xam.pel', 'Foo Bar', 'Lorem Ipsum!');
|
$return = $mailer->send('to@xam.pel', 'Foo Bar ', 'Lorem Ipsum!');
|
||||||
$this->assertEquals(1, $return);
|
$this->assertEquals(1, $return);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue