GetLastDataFromClient Method


Returns the last received portion of data sent by the client.

When OnSendData event occurs, you can use this method to actually receive the data for which this event was triggered. The method must be called once per OnSendData event occurrence. Next time this event triggers, GetLastDataFromClient will return the new portion of data, and so on.


[Visual Basic]

strData = ObjectName.GetLastDataFromClient

 
Parameters: None 
Return valueAs String The string containing the last data chunk sent by the client to the server.  

Usage example:

Option Explicit
Dim WithEvents objSMTP As MailBee.SMTP

Private Sub Form_Load()
  Set objSMTP = New MailBee.SMTP
  objSMTP.LicenseKey = "put your license key here"
  objSMTP.EnableEvents = True
  objSMTP.ServerName = "mailserver.com"
  If objSMTP.Connect Then
    objSMTP.Message.ToAddr = "bill@yoursite.com"
    objSMTP.Message.FromAddr = "joe@mysite.com"
    objSMTP.Message.Subject = "Hello"
    objSMTP.Message.BodyText = "Body text"
    objSMTP.Send
    objSMTP.Disconnect
  End If
End Sub

Private Sub SMTP_OnReceiveData(ByVal BytesReceived As Long, Proceed As Boolean)
    Debug.Print "BytesReceived=" & BytesReceived
    Debug.Print "SMTP.GetLastDataFromServer=[" & SMTP.GetLastDataFromServer & "]"
End Sub

Private Sub SMTP_OnSendData(ByVal BytesSent As Long, Proceed As Boolean)
    Debug.Print "BytesSent=" & BytesSent
    Debug.Print "SMTP.GetLastDataFromClient=[" & SMTP.GetLastDataFromClient & "]"
End Sub

See Also:

GetLastDataFromServer method


Copyright © 2002-2024, AfterLogic Corporation. All rights reserved.