RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TSendMail.ExecuteTarget Method

Displays a dialog where the user can compose an email message and then sends the message.

Pascal
procedure ExecuteTarget(Target: TObject); override;
C++
virtual __fastcall ExecuteTarget(TObject * Target);

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action). 

Target is the currently active object when the action fires. 

ExecuteTarget ignores the Target parameter, and displays a dialog where the user can compose an email message. The body of the message is initialized to the value of the Text property. When the user exits the dialog, the message is sent. 

ExecuteTarget always spawns a temporary MAPI session for every mail message, which lasts only for the duration of the message. If necessary, the user is prompted with a login dialog. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!