BeforeMail Event - .NET

<< Click to Display Table of Contents >>

Navigation:  Events Generated by the .NET Control >

BeforeMail Event - .NET

Previous pageReturn to chapter overviewNext page

[Not supported by VpeWebControl]

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.

CancelEventHandler VPE. BeforeMail(

object sender,

System.ComponentModel.CancelEventArgs e

)

object sender

the VPE document object that fired the event

System.ComponentModel.CancelEventArgs e

event data, see .NET documentation

You can set e.Cancel = true if you want to cancel the event, i.e. deny that the document will be mailed. Cancelling the operation allows you to display your own mail dialog and/or to execute your own mailing code.

Example:

Protected Sub vpe_BeforeMail (sender As Object, e As CancelEventArgs)

 e.Cancel = True

 // Here comes your own code to mail a document

End Sub

 

See also:

E-Mail Functions