Raised repeatedly while an email message is sent.
Syntax
Event Data
The event handler receives an argument of type ProgressEventArgs containing data related to this event. The following ProgressEventArgs properties provide information specific to this event.
| Property | Description |
|---|
| Length | The length of the stream. |
| Position | The position within the stream. |
Example
The following example demonstrates using the Progress event to display information about the send operation.
| Visual Basic | Copy Code |
|---|
' Be sure to import the namespace by putting "Imports Dart.PowerTCP.Mail"
' at the top of your class.
Private Sub ProgressTest()
' Do something to cause the Progress event to be raised
Smtp1.Server = "mail.test.com"
Smtp1.Send("you@test.com", "me@test.com", "test", "test message")
End Sub
Private Sub Smtp1_Progress(ByVal sender As Object, ByVal e As Dart.PowerTCP.Mail.ProgressEventArgs) Handles Smtp1.Progress
' Set the ProgressBar with progress info.
ProgressBar1.Minimum = 0
ProgressBar1.Minimum = e.Length
ProgressBar1.Value = e.Position
End Sub |
| C# | Copy Code |
|---|
// Be sure to import the namespace by putting "using Dart.PowerTCP.Mail;"
// at the top of your class.
private void ProgressTest()
{
// Do something to cause the Progress event to be raised
smtp1.Server = "mail.test.com";
smtp1.Send("you@test.com", "me@test.com", "test", "test message");
}
private void smtp1_Progress(object sender, Dart.PowerTCP.Mail.ProgressEventArgs e)
{
// Set the ProgressBar with progress info.
progressBar1.Minimum = 0;
progressBar1.Maximum = (int)e.Length;
progressBar1.Value = (int)e.Position;
} |
Remarks
Requirements
Target Platforms: Microsoft .NET Framework 2.0
See Also