Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MAPI
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
MAPI
Miscellaneous
Thread ID:
00347538
Message ID:
00347538
Views:
75
HI
My goal is to send email in background without window. I did some test with MAPI.vcx available at UT and I am not able to send email directly to the net. The mail stay in OutBox??? In this case, I try to use myself MSMAPI32.ocx with the coding below.
My last problem is I got now an error message on the "Send" line as someting is missing???

Do someone as an example code to send an email in background task like as follow?

*Begin test code to send an email in background
*In this example, I try to put all necessary code but I don't know
*what I need exactly.

LOCAL oForm
oForm = CREATEOBJECT("form")
oForm.ADDOBJECT("Session1","olecontrol","MSMAPI.mapiSession")
oForm.ADDOBJECT("Message1","olecontrol","MSMAPI.mapiMessages")
oForm.Session1.signon
oForm.Session1.NewSession
oForm.Message1.SessionID = oform.Session1.SessionID
oForm.Message1.compose
oForm.Message1.MsgIndex = -1
oForm.Message1.MsgReceiptRequested = .T.
oForm.Message1.msgsubject = "This is the subject"
oForm.Message1.msgnotetext = "This is the note!"
oForm.Message1.msgType = ""
oForm.Message1.RecipIndex = 0
oForm.Message1.RecipType = 1
oForm.Message1.RecipAddress = "myEmail@address.com"
oForm.Message1.Send(.f.)
oForm.Session1.Signoff
Release oForm
*End test

Regards,
Michel Corbin
Analystik Team
1430 Belanger
Montreal (Quebec)
Canada
(514) 278-2727
analyste@analystik.ca
Next
Reply
Map
View

Click here to load this message in the networking platform