Represents the the full contents of an email address.
property Text: string;
Text is a String property that represents the persons name and email address in RFC 2822-compliant form. Text can be used to set both the Name and Address for the TIdEMailAddressItem by providing an RFC 2822-compliant string.
// var AEmail: TIdEmailAddressItem; AEmail.Text := '"John Doe" <email@example.com>'; // AEmail.Name contains 'John Doe' // AEmail.Address contains 'firstname.lastname@example.org' // AEmail.User contains 'jdoe' // AEmail.Domain contains 'some.net' AEmail.Name := 'Jane Doe'; AEmail.Address := 'email@example.com'; // AEmail.Text contains '"Jane Doe" <firstname.lastname@example.org>'
When changing the property value, the new email address is examined for use of reserved characters, including '<', '>', '@', '(', ')', '"', SPACE, and TAB. When the new value for Text contains one of these reserved characters, it is examined for proper use of the characters in the name and address portions of the email address.
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.