Back to Mail class

Method setSubject

public \Joomla\CMS\Mail\Mail
setSubject
(mixed $subject)
Set the email subject
Parameters
  • string $subject Subject of the email
Returns
  • \Joomla\CMS\Mail\Mail Returns this object for chaining.
Since
  • 1.7.0
Class: Mail
Project: Joomla

Method setSubject - Source code

/**
 * Set the email subject
 *
 * @param   string  $subject  Subject of the email
 *
 * @return  Mail  Returns this object for chaining.
 *
 * @since   1.7.0
 */
public function setSubject($subject)
{
    $this->Subject = MailHelper::cleanLine($subject);
    return $this;
}