Thanks to everyone how helped on this, with the provided hints, and much searching of technet and MSDN, the solution follows:
* Folder Name Value *
* ---------------------- *
* Deleted Items 3 *
* Outbox 4 *
* Sent Items 5 *
* Inbox 6 *
* Calendar 9 *
* Contacts 10 *
* Journal 11 *
* Notes 12 *
* Tasks 13 *
* *
****************************************************************
#DEFINE CRLF CHR(13)+CHR(10)
#DEFINE TABC CHR(9)
SET OLEOBJECT ON
Local lto, lsubject, lbody && strings
&& These will come from db later today
lto = "Gottschewski LA@Comox" && Just got volenteers for further testing
lsubject = "Test"
lbody = "Yadda "
lbody = lbody + lbody
oMailOle = CREATEOBJECT("Outlook.Application")
NSOle = oMailOle.GetNamespace("MAPI")
oOutFolder = NSOle.GetDefaultFolder(4) && constant for outbox
oMailItem = oOutFolder.Items.Add()
with oMailItem
.To = lto
.Body = lbody
.Subject = lsubject
.save && This one lousy line is ESSENTIAL, or it won't work
.Send
endwith
Release oMailItem
Release NS0le
Release oMailOle
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement