OnProgress event
|
SendMail component.
|
type
|
TSMTPProgressEvent = procedure(Sender: TObject; MessageSize, BytesSent: Integer; PercentsDone: Byte) of object;
|
|
property OnProgress: TSMTPProgressEvent;
|
The OnProgress event occurs every time when the component has successfully sent the part of e-mail message to SMTP server.
|
|
Write OnProgress event handler to show the download progress. The SendMail passes to the event handler following parameters:
|
Parameter | Meaning
|
MessageSize | total size of e-mail message in bytes;
|
BytesSent | number of bytes that already sent to SMTP server;
|
PercentsDone | progress in percents (0%..100%).
|
procedure TForm1.SendMail1Progress(Sender: TObject; MessageSize,
|
BytesSent: Integer; PercentsDone: Byte);
|
begin
|
ProgressBar1.Position := PercentsDone;
|
end;
|
OnSuccess event.
|