0 votes
by (150 points)
edited

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
by (147k points)
edited
 
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.

by (150 points)
edited

thanks a lot!

...