INetMapiMessage.To_

Syntax

To_: IStringList;

Description

The To_ property returns the email addresses collection of recipients.

NOTE. All The email address format must conform to the address format used in emailing organization based on the SMTP and POP protocols and must be of the following form: address@mail_domain, where address - recipient identifier, and mail_domain - mail server domain name. Example: user@mail.ru.

Example

Sub Main;

Var

Msg: INetMapiMessage;

Client: INetMapiClient;

Begin

Client := New NetMapiClient.Create;

Msg := New NetMapiMessage.Create;

Msg.From_ := "ivanov@server.ru";

Msg.To_.Add("petrov@mail.ru");

Msg.Subject := "Test letter";

Msg.Body := "Letter text";

Client.Message := Msg;

Client.Send;

End Sub Main;

After executing this example the email is sent using the application installed in the operating system and used as a default mail client.

See also:

INetMapiMessage