Perhaps unsent/undelivered messages could be queued, and when the client is back online the queued messages could be sent.