public function setBody($body)
{
if (is_array($body)) {
$this->body = new BodyOptions($body);
} elseif ($body instanceof BodyOptions) {
$this->body = $body;
} else {
throw new InvalidArgumentException(sprintf('Body should be an array or an AcMailer\\Options\\BodyOptions, %s provided', is_object($body) ? get_class($body) : gettype($body)));
}
return $this;
}