Back to Mail class

Method setBody

public \Joomla\CMS\Mail\Mail
setBody
(mixed $content)
Set the email body
Parameters
  • string $content Body of the email
Returns
  • \Joomla\CMS\Mail\Mail Returns this object for chaining.
Since
  • 1.7.0
Class: Mail
Project: Joomla

Method setBody - Source code

/**
 * Set the email body
 *
 * @param   string  $content  Body of the email
 *
 * @return  Mail  Returns this object for chaining.
 *
 * @since   1.7.0
 */
public function setBody($content)
{
    /*
     * Filter the Body
     * @todo: Check for XSS
     */
    $this->Body = MailHelper::cleanText($content);
    return $this;
}