General information
Category:
COM/DCOM and OLE Automation
Hi
Here is the code I am executing :
What I would like to be able to do is issue oform.Message1.send(1) command and not have Foxpro wait. You see lots of web pages which say things like e-mail us and you click e-mail and up pops an e-mal addressed to them, but the web page continues without waiting for the e-mail to be sent. Its that sort of functionality I'm looking for.
By the way with a name like yours which side of the water were you born on :-)
--Mike
* Create an instance of a form, and then add the MSMAPI.MAPISession and
* MSMAPI.MAPIMessages OLE controls to that form:
oform = CreateObject("form")
oform.addobject("Session1","olecontrol","MSMAPI.mapiSession")
oform.addobject("Message1","olecontrol","MSMAPI.mapiMessages")
* Call the Signon method of the MAPISession control. If the user is not
* logged into mail, this will prompt the user to sign on. This also sets
* the SessionId property for the MAPIsession control:
oform.Session1.signon
* Set the SessionId of the MAPIMessage control to the SessionId of the
* MAPISession control, which was just obtained:
oform.Message1.sessionid = oform.Session1.sessionid
* Compose an e-mail message and set the subject line and Message text:
oform.Message1.compose
oform.Message1.msgsubject = "Report"
oform.Message1.msgnotetext = "See the attached report"
oform.Message1.AttachmentPathName = tOutputFile
* Sends the e-mail message. The (1) is required to send the message.
SET DEFAULT TO (pcapp.CurDir)
ON ERROR WAIT WIND 'Error Message Returned : E-mail May Not Be Sent..' NOWAIT
oform.Message1.send(1)
tLine="On Error "+pcapp.ErrorCommand
&TLine
SET DEFAULT TO (pcapp.CurDir)
* Optionally, sign off from mail:
oform.Session1.signoff
* Optionally, release the objects if they are no longer needed:
release oform
SET DEFAULT TO (pcapp.CurDir)
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