GetLastDataFromServer Method
Returns the last received portion of data from the server.
When OnReceiveData 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 OnReceiveData event occurrence. Next time this event triggers, GetLastDataFromServer will return the new portion of data, and so on.
[Visual Basic] strData = ObjectName.GetLastDataFromServer |
Parameters: | None | |
Return valueAs String | The string containing the last data chunk received from 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:
Copyright © 2002-2024, AfterLogic Corporation. All rights reserved.