I have a program in which I'm sending and receiving e-mails with large attachments. I'm using MailKit. I would like to get actual upload speed (or amount of already sent data) for each email.
How can I get this?
I have a program in which I'm sending and receiving e-mails with large attachments. I'm using MailKit. I would like to get actual upload speed (or amount of already sent data) for each email.
How can I get this?
There's no way to get 100% accurate upload/downloads speeds in MailKit, but MailKit does have APIs that take an ITransferProgress argument, such as the send method:
http://www.mimekit.org/docs/html/Overload_MailKit_MailTransport_Send.htm
You can implement your own ITransferProgress class that tracks transfer of data such as messages which should give you a rough idea.
This will allow you to get notifications of how much data has been uploaded (or downloaded when used with the various ImapFolder and/or Pop3Client methods), and, based on that + overall time spent, you can calculate transfer speeds.