/** * @return mixed */ public function getBody() { if ($this->body) { return $this->body; } return parent::getBody(); }
public function testMimeParts() { $mime = new Mime(); $mime->setBoundary('4cda2d9a46f80b7b49b97e0417fdcc86095967bf'); $headers = $mime->getHeaders(); $headers->set('From', '*****@*****.**'); $headers->set('To', '*****@*****.**'); $headers->set('Subject', 'Hello World'); $mime->push("Content-Type: text/plain\r\n\r\nFoo"); $mime->push("Content-Type: text/plain\r\n\r\nBar"); $this->assertStringEqualsFile(__DIR__ . '/MimeTest_SinglePart.eml', str_replace("\r", "", $mime)); }