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
Var s As String
s = ToAddressField.Value.ReplaceAll(",", Chr(13))
s = s.ReplaceAll(Chr(13) + Chr(10), Chr(13))
Var recipients() As String
recipients = s.Split(Chr(13))
For Each recipient As String In recipients
mail.AddRecipient(Trim(recipient))
Next