javamail estimated time

E

Emmanuel Freund

Sorry for posting this again, but let me reformulate my question :
Is there a way to compute the estimated time for sending an email with some
attachments?
I think I can have the speed connection and the size of the email, but this
way is too approximate...
 
N

Neil Campbell

Emmanuel said:
Sorry for posting this again, but let me reformulate my question :
Is there a way to compute the estimated time for sending an email with
some attachments?
I think I can have the speed connection and the size of the email, but
this way is too approximate...

[Sorry, I'd just finished replying to your other post before I saw this
one.]

If you have the size of the email and the speed of the connection, you can
get an approximate time, yes. If you need it to be a little more accurate,
you could probably recalculate the speed of the connection as you send.
I'm not sure if this is possible within Javamail (I imagine you just call
Transport.send() and let it do the work). However, for something like
sending a message it may be feasible to implement the sending of the
message yourself - SMTP isn't too complicated, and you could put the
relevent hooks in to update your current speed and ETA as you write the
data.

Ultimately though, you can't be much more precise about the time to send
until you've finished - there could always be an unexpected hold up caused
by an increase in network traffic or whatever.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top