Occurs when data is sent to the IMAP4 server.
Namespace: MailBee.ImapMailAssembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax Remarks Unlike
LowLevelDataSent event, occurrence of this event
indicates sending IMAP4-related data only. For instance, if the transmission channel
is SSL-encrypted,
LowLevelDataSent event indicates sending
of any portion of encrypted data, while
DataSent will be raised later
to indicate the entire request (which was previously sent as one or several encrypted
data chunks) has been sent. If the transmission channel is not encrypted or otherwise
scrambled,
DataSent and
LowLevelDataSent are equivalent.
Examples This sample prints all the data sent to the server during IMAP4 session
into console.
using System;
using MailBee;
using MailBee.ImapMail;
class Sample
{
private static void OnDataSent(object sender, DataTransferEventArgs e)
{
Console.WriteLine("[" + System.Text.Encoding.Default.GetString(e.Data) + "]");
}
static void Main(string[] args)
{
Imap imp = new Imap();
imp.DataSent += new DataTransferEventHandler(OnDataSent);
imp.Connect("imap.host.com");
imp.Login("jdoe", "secret");
imp.Disconnect();
}
}
Imports System
Imports MailBee
Imports MailBee.ImapMail
Module Sample
Private Sub OnDataSent(ByVal sender As Object, ByVal e As DataTransferEventArgs)
Console.WriteLine("[" & System.Text.Encoding.Default.GetString(e.Data) & "]")
End Sub
Sub Main(ByVal args As String())
Dim imp As New Imap
AddHandler imp.DataSent, AddressOf OnDataSent
imp.Connect("imap.host.com")
imp.Login("jdoe", "secret")
imp.Disconnect()
End Sub
End Module
See Also