tek3
tek3

Reputation: 2115

Detect whether email is sent or not + Blackberry

I am facing a little problem with Transport.send(msg) function of Blackberry API. In my application I need to send a sound file. But I want to know what happens if the device loses connectivity in middle of sending the email.

I tried to enclose the Transport.send(msg) call within try catch block but it never throws exception even if I manually turn off the Wi-Fi from the device while the file is being sent. If by any chance email could not be sent I want to show the user a dialog saying that email could not be sent.

Upvotes: 0

Views: 94

Answers (1)

rfsk2010
rfsk2010

Reputation: 8611

You can catch SendFailedException which is thrown when a message cannot be sent.

You can monitor the messages by calling getStatus() on a message which should return you the values given here

Upvotes: 1

Related Questions