public function PHPMailer::has8bitChars

5.x PHPMailer.php public PHPMailer::has8bitChars($text)

Does a string contain any 8-bit chars (in any charset)?

Parameters

string $text:

Return value

bool

4 calls to PHPMailer::has8bitChars()
PHPMailer::addOrEnqueueAnAddress in inc/PHPMailer/src/PHPMailer.php
Add an address to one of the recipient arrays or to the ReplyTo array. Because PHPMailer can't validate addresses with an IDN without knowing the PHPMailer::$CharSet (that can still be modified after calling this function), addition of such…
PHPMailer::createBody in inc/PHPMailer/src/PHPMailer.php
Assemble the message body. Returns an empty string on failure.
PHPMailer::punyencodeAddress in inc/PHPMailer/src/PHPMailer.php
Converts IDN in given email address to its ASCII form, also known as punycode, if possible. Important: Address must be passed in same encoding as currently set in PHPMailer::$CharSet. This function silently returns unmodified address if:
PHPMailer::setFrom in inc/PHPMailer/src/PHPMailer.php
Set the From and FromName properties.

File

inc/PHPMailer/src/PHPMailer.php, line 3205

Class

PHPMailer
PHPMailer - PHP email creation and transport class.

Namespace

PHPMailer\PHPMailer

Code

public function has8bitChars($text) 
 {
  return (bool) preg_match('/[\x80-\xFF]/', $text);
}