'Send the contents of a message.
@type i: L{bytes}
@param i: A 1-based message index.
@type fpWrapper: callable that takes a file-like object and returns
a file-like object
@param fpWrapper:
@type successResponse: callable that takes L{int} and returns
L{bytes}
@param successResponse:
@rtype: L{Deferred}
@return: A deferred which triggers after the message has been sent.'

def _sendMessageContent(self, i, fpWrapper, successResponse):

    d = self._getMessageFile(i)
    def cbMessageFile(info):
        if (info is None):
            return
        self._highest = max(self._highest, int(i))
        (resp, fp) = info
        fp = fpWrapper(fp)
        self.successResponse(successResponse(resp))
        s = basic.FileSender()
        d = s.beginFileTransfer(fp, self.transport, self.transformChunk)
        def cbFileTransfer(lastsent):
            if (lastsent != '\n'):
                line = '\r\n.'
            else:
                line = '.'
            self.sendLine(line)
        def ebFileTransfer(err):
            self.transport.loseConnection()
            log.msg('Unexpected    error    in    _sendMessageContent:')
            log.err(err)
        d.addCallback(cbFileTransfer)
        d.addErrback(ebFileTransfer)
        return d
    return self._longOperation(d.addCallback(cbMessageFile))
