Code: Alles auswählen.
* GroupWise Session erstellen
create object mo_gw 'NovellGroupWareSession'.
* Login
call method of mo_gw 'Login' = mo_gwaccount.
* Mailbox-Folder erstellen
get property of mo_gwaccount 'MailBox' = mo_gwmailbox.
* Messages-Collection erstellen
get property of mo_gwmailbox 'Messages' = mo_gwmessages.
* Neue Message erstellen
call method of mo_gwmessages 'Add' = mo_gwmessage
exporting
#1 = 'GW.MESSAGE.MAIL'
#2 = 'Draft'.
* Attachements-Objekt erstellen
get property of mo_gwmessage 'Attachments' = mo_gwattachments.
* Receipients-Objekt erstellen
get property of mo_gwmessage 'Recipients' = mo_gwrecipients.
* Adresse hinzufügen
call method of mo_gwrecipients 'Add' = mo_gwrecipient
exporting
#1 = iv_recipients.
* Betreff einfügen
set property of mo_gwmessage 'Subject' = iv_subject.
* Body einfügen
set property of mo_gwmessage 'BodyText' = iv_body.
* Anlage einfügen
call method of mo_gwattachments 'ADD'
exporting
#1 = iv_filename.
Code: Alles auswählen.
call method of mo_gwmessage 'Send'.
Code: Alles auswählen.
* Die MessageID holen
get property of mo_gwmessage 'MessageID' = lv_messageid.
* GroupWiseCommander erstellen
create object mo_gwcom 'GroupWiseCommander'.
* Befehl im Commander ausführen
concatenate 'ItemOpen(' '"' lv_messageid '"' ')' into lv_execstring.
call method of mo_gwcom 'Execute'
exporting
#1 = lv_execstring
#2 = lv_returnstring.