The
EmailAddress type is used to handle an email address as well as its type (home, office, etc.).
The characteristics of this email address can be defined and modified by several WLanguage properties.
This type of variable is used by the
Contact variables.
Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see
Declaring a variable.
MyContact is Contact
// Retrieves the first professional email address of a contact
sAddress is string
FOR EACH Email OF MyContact.Email
SI Email.Type = emailWork THEN
sAddress = Email.Address
RETURN
END
END
// Displays the contacts and their different emails
garrContacts is array of Contact
gCurrentContact is Contact
garrContacts = ContactList(Null)
Info("Number of contacts: " + garrContacts.Count)
FOR EACH gCurrentContact OF garrContacts
Info(gCurrentContact.DisplayedName)
FOR EACH Email OF gCurrentContact.Email
Info(Email.Address)
END
END
Remarks
Properties specific to the description of EmailAddress variables
The following properties can be used to handle an Email address:
| | |
Property name | Type used | Effect |
---|
Address | Character string | Email address. |
Label | Character string | Label for the custom types of email addresses (optional). If Type does not correspond to the emailCustom constant, the value of this property will be ignored. |
Type | Integer constant | Type of email address: - emailOther: other types.
- emailWork: professional email address.
- emailHome: personal email address.
- emailCell: email address of phone.
- emailCustom: custom type corresponding to the value of the Label property.
|
Reinitialization
You can use
VariableReset to reset the contents of a variable of type
EmailAddress.