SMTP TransferProgress - calculate percent progress

0 votes
asked Apr 7, 2012 by indyjones (150 points)
edited Jun 11, 2012

The SMTP TransferProgress does not have a "total bytes" value, so it it impossible to calculate the progress percentage for showing in the UI - this is useful when sending large attachments.

Is there any way to achieve this?

Applies to: Rebex Secure Mail

1 Answer

0 votes
answered Apr 10, 2012 by Lukas Pokorny (123,810 points)
edited Jun 11, 2012
 
Best answer

We'll add this value to the next release, thanks for your suggestion!

In the meantime, to get a reasonable estimate of "total bytes" value, save the message to an instance of System.IO.MemoryStream and use Length for this purpose. This should be very close to the desired value in most cases (but make sure to be able to handle values of BytesTransferred grater than the Length).

Update: This has been added in Rebex FTP/SSL 2012 R2.

commented Apr 10, 2012 by indyjones (150 points)
edited Apr 10, 2012

thanks a lot!

...