public function data(string $header, string $body) : self
{
$lineEnds = [\Jyxo\Mail\Sender::LINE_END . '.' => self::LINE_END . '..', \Jyxo\Mail\Sender::LINE_END => self::LINE_END];
$header = strtr($header, $lineEnds);
$body = strtr($body, $lineEnds);
if ('.' == $body[0]) {
$body = '.' . $body;
}
$this->commandData();
$this->writeData(trim($header));
$this->writeData('');
$this->writeData($body);
$this->writeData('.');
$response = $this->readData();
if ('250' !== substr($response, 0, 3)) {
throw new SmtpException('SEND: ' . $response);
}
return $this;
}