public static function PHPMailer::idnSupported

5.x PHPMailer.php public static PHPMailer::idnSupported()

Tells whether IDNs (Internationalized Domain Names) are supported or not. This requires the `intl` and `mbstring` PHP extensions.

Return value

bool `true` if required functions for IDN support are present

3 calls to PHPMailer::idnSupported()
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::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 1317

Class

PHPMailer
PHPMailer - PHP email creation and transport class.

Namespace

PHPMailer\PHPMailer

Code

public static function idnSupported() 
 {
  return function_exists('idn_to_ascii') and function_exists('mb_convert_encoding');
}