wodSmtpServer ActiveX Control - MailStart Event
    
 

Description

Fires when user starts sending mail body.


Syntax

Private Sub object_MailStart(User)



The MailStart Event syntax has these parts:

Part Description
object A wodSmtpServer object.
User A SmtpUser object. Reference to the user who will send body of the message.

Remarks

This event is fired just before client is ready to post actual message body. Everything before this point was information about sender and recipient of the message, but actually body is about to be posted. At this time, if you haven't done so already, you might want to decide what to do with the message. At this point you already know all the recipients, and you can just set User.Message.Filename property to file on disk where message will be saved (or let wodSmtpServer write it to temporary location).

If there's more than one recipient, you should store email directly to user's mailbox. Rather, you should keep it somewhere temporarily and later on copy it to appropriate mailbox. However, you don't have to create temporary files manually, because wodSmtpServer will do this for you by default.