Skip to content

Commit

Permalink
Use alternativeExists method for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
Synchro committed Jan 7, 2016
1 parent c2bde34 commit 7850d18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions class.phpmailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,7 @@ public function preSend()
}

// Set whether the message is multipart/alternative
if (!empty($this->AltBody)) {
if ($this->alternativeExists()) {
$this->ContentType = 'multipart/alternative';
}

Expand Down Expand Up @@ -3333,7 +3333,7 @@ public function msgHTML($message, $basedir = '', $advanced = false)
// Convert all message body line breaks to CRLF, makes quoted-printable encoding work much better
$this->Body = $this->normalizeBreaks($message);
$this->AltBody = $this->normalizeBreaks($this->html2text($message, $advanced));
if (empty($this->AltBody)) {
if (!$this->alternativeExists()) {
$this->AltBody = 'To view this email message, open it in a program that understands HTML!' .
self::CRLF . self::CRLF;
}
Expand Down

0 comments on commit 7850d18

Please sign in to comment.