Spaces on ends of lines in plaintext version of email
Notice: This thread is very old.
- HosipLan
- Moderator | 4668
I think its because it replaces endlines with spaces.
I see the only way as extend the default Message class and override buildText()
class MyMessage extends Nette\Mail\Message
{
protected function buildText()
{
parent::buildText();
$text = $this->getBody();
$text = Nette\Utils\Strings::replace($text, '~\s+$~m', "");
$this->setBody($text);
}
}
This should remove whitespaces at the end of each line. Hope you can finish this on your own :)