You are here

public function PHPMailer::HasMultiBytes in SMTP Authentication Support 7

Same name and namespace in other branches
  1. 7.2 smtp.phpmailer.inc \PHPMailer::HasMultiBytes()

Checks if a string contains multibyte characters. @access public

Parameters

string $str multi-byte text to wrap encode:

Return value

bool

1 call to PHPMailer::HasMultiBytes()
PHPMailer::EncodeHeader in ./smtp.phpmailer.inc
Encode a header string to best (shortest) of Q, B, quoted or none. @access public

File

./smtp.phpmailer.inc, line 1586
The mail handler class in smtp module, based on code of the phpmailer library, customized and relicensed to GPLv2.

Class

PHPMailer
PHPMailer - PHP email transport class NOTE: Requires PHP version 5 or later @package PHPMailer @author Andy Prevost @author Marcus Bointon @copyright 2004 - 2009 Andy Prevost

Code

public function HasMultiBytes($str) {
  if (function_exists('mb_strlen')) {
    return strlen($str) > mb_strlen($str, $this->CharSet);
  }
  else {

    // Assume no multibytes (we can't handle without mbstring functions anyway)
    return FALSE;
  }
}