wodSmtpServer ActiveX Control - MailStart Method
      
 

Description

Called when user starts sending mail body.


Return Type

None  


Syntax

object.MailStart Owner, User



The MailStart Method syntax has these parts:

Part Description
object An expression evaluating to an object of type wodSmtpNotify.
Owner Required. A wodSmtpServer object. Reference to wodSmtpServerCom instance that called this callback method.
User Required. A SmtpUser object. Reference to the user who will send body of the message.

Remarks

NOTE: This method is called only if you implemented IwodSmtpNotify interface in your application, and wodSmtpServer1.Notification property has received reference to instance of your implementation.

This notification method is called 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.

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.