loApp = creat('outlook.application')
lospace = loapp.getnamespace("MAPI")
for each lofolder in lospace.folders
* ?lofolder.name
for each losubfolder in lofolder.folders
* ?"--"+losubfolder.name
if upper(losubfolder.name) = "OUTBOX"
loOutbox = losubfolder
loMessage = loOutBox.items.add()
exit
endif
endfor
endfor
if vartype (loOutbox) = "O" and vartype(loMessage) = "O"
*?"found Outbox"
*lomessage = loOutbox.items.add()
with lomessage
.body = tcBody
.subject = tcSubject
.recipients.add(tcRecipient)
.send()
* ?"message sent"
endwith
endif
Hope this could help :)
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only