PHPMailer::punyencodeAddress
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: - No conversion is necessary (i.e. domain name is not an IDN, or is already in ASCII form) - Conversion to punycode is impossible (e.g. required PHP functions are not available) or fails for any reason (e.g. domain has characters not allowed in an IDN)
Signature
public function punyencodeAddress(string
$address )
Parameters
$address
— string
The email address to convert
Returns
- string
- The encoded address in ASCII form
Violations
Checkstyle
Line | Column | Severity | Message |
---|---|---|---|
1264 | 157 | warning | Line exceeds 120 characters; contains 157 characters |