<< Click to Display Table of Contents >> OnBeforeMail Event |
Is fired, when the user clicked the eMail-button in the preview (or pushed the corresponding key). The e-mail was not sent yet, therefore your application has now the option to set receivers, attachments, etc. by code.
OnBeforeMail(
Sender: TVPEngine;
var Cancel: Boolean
)
Sender
the VPE object that fired the event
Cancel
is a return-parameter, i.e. you can assign it one of the following values to control the resulting action of VPE:
Value |
Description |
True |
cancel operation i.e. do not mail the document |
False |
continue operation |
If you set this parameter to True, the operation is cancelled, i.e. VPE will not mail the document. Cancelling the operation allows you to display your own mail dialog and/or to execute your own mailing code.