Internet Direct (Indy)
Home
PreviousUpNext
EncodeAddressItem Function

Converts an email address to a string using contenta and transfer encodings and character set.

Pascal
function EncodeAddressItem(
    EmailAddr: TIdEmailAddressItem; 
    const HeaderEncoding: Char; 
    TransferHeader: TTransfer; 
    MimeCharSet: string; 
    AUseAddressForNameIfNameMissing: Boolean = False
): string;
Parameters 
Description 
EmailAddr 
EMail address to be encoded.
 
HeaderEncoding 
Header encoding for the encoded EMail address.
 
TransferHeader 
Transfer encoding for the encoded EMail address.
 
MimeCharSet 
MIME character set to use for the encoded EMail address.
 
AUseAddressForNameIfNameMissing 
Default is False. 

string - The encoded EMail address in Name and Address format.

EncodeAddressItem is a String function that converts the EMail address in EMailAddr to an encoded string representation using the encodings and character set specified in the parameters to the function. Encoding is performed using the EncodeHeader function when the email address contains characters not representable in the US-ASCII character set. 

The return value for EncodeAddressItem is a string that represents the EMail address and optional name from EMailAddr. When EmailAddr contains the optional name, the return string contains data in the following format:

example missing. 

 

 

The special characters '\' and '"' in the email address will be quoted using the '\' character.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.