EmailAddressEscapeIdnDomain Method
Converts domain part of e-mail address string into IDN format.

Namespace: MailBee.Mime
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.4 build 677 for .NET 4.5
Syntax
public static string EscapeIdnDomain(
	string email
)

Parameters

email
Type: SystemString
E-mail address string.

Return Value

Type: String
E-mail address string whose domain part is encoded in Punycode.
Remarks

You can use this method to get an international e-mail address string in SMTP friendly format (called Punycode). It's safe to use this method for addresses which don't contain any international characters, you'll just get the same output as input.

This method converts "user@яндекс.рф" to "user@xn--d1acpjx3f.xn--p1ai". Only domain part (after "@") is converted.

If you have an EmailAddress object (not just a string) which you want to convert, you can use ToIdnAddress method instead.

Note Note
Punycode works for domain part only. See ToIdnAddress method documentation on how to deal with e-mail addresses having international chars in username (not just in domain).
See Also