EmailMessage.ToAddress

From Xojo Documentation

Property (As String )
aEmailMessage.ToAddress = newStringValue
or
StringValue = aEmailMessage.ToAddress

Supported for all project types and targets.

Gets the addresses for this email and returns a comma-separated list of Strings.

Example

// add recipients
s = replaceAll(toAddressFld.text,",",chr(13))
s = replaceAll(s,chr(13)+chr(10),chr(13))
for i = 1 to countFields(s,chr(13))
mail.addRecipient trim(nthField(s,chr(13),i))
next