event BeginSend (Msg as Message)
Fired just before starting sending the message.

TypeDescription
Msg as Message A Message object being sent.

The BeginSend event is fired when Send method starts sending the message. The BeginEnd event is fired only if the Notifier property points to the EMail object. Once that BeginSend message was fired, the Message object is not released until EndSend event is fired. Use the BeginSend event to notify your application when a Message starts to be send. The following sample shows how to send two email messages:

Dim WithEvents e As EMail

Private Sub e_BeginSend(ByVal Msg As EXEMAILLibCtl.IMessage)
    Debug.Print Msg.Subject & " message begins. "
End Sub

Private Sub e_EndSend(ByVal Msg As EXEMAILLibCtl.IMessage)
    Debug.Print Msg.Subject & " message ends."
End Sub

Private Sub e_Debug(ByVal Msg As EXEMAILLibCtl.IMessage, ByVal Description As String)
    Debug.Print Msg.Subject & " DEBUG: " & Description
End Sub
Private Sub Form_Load()
    ' Creates an EMail object, that will receive Message notifications
    Set e = Runtime1.NewEMail()
    ' Creates two Message objects
    Dim m1 As Message
    Set m1 = Runtime1.NewMessage()
    ' Message' notifications are sent through EMail object
    Set m1.Notifier = e
    Set m2 = Runtime1.NewMessage()
    ' Message' notifications are sent through EMail object
    Set m2.Notifier = e

    ' The email addresses are absolutely arbitrary!

    ' Sends a message to one user
    m1.Send "me@malibu.com", "user1@yahoo.com", "Test1", "TEST"

    ' Sends a message to 2 users
    m2.Send "me@malibu2.com", "user2@yahoooo.com,user3@cobra.com", "Test2", "TEST"
End Sub