INetMailMessage.Subject

Syntax

Subject: String;

Description

The Subject property determines an email message subject header.

Example

Sub Main;

Var

From_, To_: INetMailAddress;

Message: INetMailMessage;

Client: INetSmtpClient;

Begin

From_ := New NetMailAddress.Create("ivanov@server.ru");

To_ := New NetMailAddress.Create("petrov@mail.ru");

Message := New NetMailMessage.CreateWithFromAndTo(From_, To_);

Message.Subject := "Test message";

Message.Body := "Message text";

Client := New NetSmtpClient.CreateWithHost("example.server.ru");

Client.Send(Message);

End Sub Main;

After executing the example the message is sent via the specified mail server. This message is created considering the sender and the recipient addresses without any copies sending.

See also:

INetMailMessage