Internet Direct (Indy) Version 9.0.2 Beta
TIdSMTP.QuickSend
Sends a message without an Indy message instance.

class procedure QuickSend(const AHost: String; const ASubject: String; const ATo: String; const AFrom: String; const AText: String);
Parameters
const AHost: String
SMTP server used to send the message.

const ASubject: String
Subject of the message.

const ATo: String
Recipient(s) of the message.

const AFrom: String
Person sending the message.

const AText: String
Body text for the message.

Description
QuickSend is a class procedure that allows the SMTP client to quickly send a message without the need for a TIdMessage instance. QuickSend cannot be used to send messages with attachments. Use Send to transfer messages that include attachments.

Parameters for the method are used to construct a TIdMessage instance, connect and send the message to the SMTP server, and to Disconnect from the SMTP server. The following is an example of using QuickSend with pre-defined application variables:

  try
    ASmtp.QuickSend(SMailhost, SSubject, SUserAccount,
      SContactAccount, ABody.Text);
  except on E:
    do DoReminderTransmitError(E);
  end;