if (!
$this->AllowEmpty &&
empty($this->Body
)) { throw new Exception($this->
lang('empty_message'
), self::STOP_CRITICAL
);
} //Trim subject consistently
$this->Subject =
trim($this->Subject
);
//Create body before headers in case body makes changes to headers (e.g. altering transfer encoding)
$this->MIMEHeader = '';
$this->MIMEBody =
$this->
createBody();
//createBody may have added some headers, so retain them
$tempheaders =
$this->MIMEHeader;
$this->MIMEHeader =
$this->
createHeader();
$this->MIMEHeader .=
$tempheaders;
//To capture the complete message when using mail(), create
//an extra header list which createHeader() doesn't fold in
if ('mail' ===
$this->Mailer
) { if (count($this->to
) > 0
) { $this->mailHeader .=
$this->
addrAppend('To',
$this->to
);
} else { $this->mailHeader .=
$this->
headerLine('To', 'undisclosed-recipients:;'
);
} $this->mailHeader .=
$this->
headerLine(