The following is a VB.NET sample that retrievs the Outbox messages (similar to the Messages Overview in the application).
GetOutbox (Visual Basic)
Dim oCmpSrv As SAPbobsCOM.CompanyService
Dim oMessageService As MessagesService
Dim oUserOutbox As MessageHeaders
Dim oMessageHeader As MessageHeader
Dim oMessage As Message
Dim iAttachment As Integer
Dim sSubject As string
Dim sDate As String
Dim sTime As String
'get company service
oCmpSrv = oCompany.GetCompanyService
'get msg service
oMessageService = oCmpSrv.GetBusinessService(ServiceTypes.MessagesService)