* lcURL=[http://www.myWebSite.com/MyEMailRetriever.ASP] * lcWebSeriveCDO = request parameters to point to boxes and messages in xml container (or CSV) * lcSendCDOMailBoxParms = a simple xml with necessary CDO mailbox and mail item pointers oHTTP=NewOBJECT("MSXML2.XMLHTTP") oHTTP.open([POST],lcURL,.f.) && Note the POST method indicating a request package && is attached. If the parameter list is tiny, you could && use the GET method. oHttp.setRequestHeader("Content-Type", "text/xml") oHttp.send(lcSendCDOMailBoxParms) * lcResponseText is the email, or series of emails in an XML or CSV returned by www.myWebSite.com/MyEMailRetriever.ASP lcResponseText = oHTTP.ResponseAt the top of the Web Service in Classic ASP example:
(!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN") (html)(head) (% Response.Expires = 0 dim oXML set oXML = Server.CreateObject("Msxml2.DOMDocument") oXML.async = false oXML.resolveExternals = false oXML.load(Request) dim oItems,cParm1,cParm2, cParm3 set oItems=oXML.selectSingleNode("row") cParm1=oItems.selectSingleNode("Parm1).text cParm2=oItems.selectSingleNode("Parm2").text cParm3=oItems.selectSingleNode("Parm3").textThere's a lot of info on the CDO MailBox and MailItem pointers - did not have time to run them down. The might be addressed just like a CDO relay request message object property names: "To", "From", "Bcc", "Subject", Textbody", etc. Design issues may include what to do with an email that has been downloaded to a client folder. Should it be moved to another mailbox, deleted, or allowed to remain in the receiving box. If it is moved or deleted, then every time the VFP client runs an email retrieval it begin with the first Mail Item. If not, that last retrieved mail item index would need to be hard stored by the client or in a server sql table.
oConn.close Set oConn = Nothing Set oRs = Nothing Set Fields = Nothing Set objMessage = Nothing Set objConfig = Nothing %) (title)(/title) (meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1")(/head) (body) cReturnPage (/body)(/html)Don't know that a simple line instruction like cReturnPage will work, the returned email content may have to be "literally" parsed to HTML tags- it's been so long.or call a JS script that would insert an xml string inside a element ID.