|
@@ 392-404 (lines=13) @@
|
| 389 |
|
* @param string|bool $plainTitle Title that is used in the plain text email |
| 390 |
|
* if empty the $title is used, if false none will be used |
| 391 |
|
*/ |
| 392 |
|
public function addHeading($title, $plainTitle = '') { |
| 393 |
|
if ($this->footerAdded) { |
| 394 |
|
return; |
| 395 |
|
} |
| 396 |
|
if ($plainTitle === '') { |
| 397 |
|
$plainTitle = $title; |
| 398 |
|
} |
| 399 |
|
|
| 400 |
|
$this->htmlBody .= vsprintf($this->heading, [htmlspecialchars($title)]); |
| 401 |
|
if ($plainTitle !== false) { |
| 402 |
|
$this->plainBody .= $plainTitle . PHP_EOL . PHP_EOL; |
| 403 |
|
} |
| 404 |
|
} |
| 405 |
|
|
| 406 |
|
/** |
| 407 |
|
* Open the HTML body when it is not already |
|
@@ 425-439 (lines=15) @@
|
| 422 |
|
* @param string|bool $plainText Text that is used in the plain text email |
| 423 |
|
* if empty the $text is used, if false none will be used |
| 424 |
|
*/ |
| 425 |
|
public function addBodyText($text, $plainText = '') { |
| 426 |
|
if ($this->footerAdded) { |
| 427 |
|
return; |
| 428 |
|
} |
| 429 |
|
if ($plainText === '') { |
| 430 |
|
$plainText = $text; |
| 431 |
|
} |
| 432 |
|
|
| 433 |
|
$this->ensureBodyIsOpened(); |
| 434 |
|
|
| 435 |
|
$this->htmlBody .= vsprintf($this->bodyText, [htmlspecialchars($text)]); |
| 436 |
|
if ($plainText !== false) { |
| 437 |
|
$this->plainBody .= $plainText . PHP_EOL . PHP_EOL; |
| 438 |
|
} |
| 439 |
|
} |
| 440 |
|
|
| 441 |
|
/** |
| 442 |
|
* Adds a list item to the body of the email |