PHPMailer::punyencodeAddress

Advertisement

Summery Summery

Converts IDN in given email address to its ASCII form, also known as punycode, if possible.

Syntax Syntax

PHPMailer::punyencodeAddress( string $address )

Description Description

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)

Parameters Parameters

$address

(string) (Required) The email address to convert

Return Return

(string) The encoded address in ASCII form

Source Source

File: wp-includes/class-phpmailer.php


			

Advertisement

See also See also

  • PHPMailer::$CharSet

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.