Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to XMLHTTP a parameter to ASP
Message
From
08/11/2005 11:19:41
 
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
01066201
Message ID:
01066462
Views:
20
This message has been marked as the solution to the initial question of the thread.
Reference the cBody from the URL has to be done with either a REQUEST() function (very generic), or more directly with a REQUEST.QUERYSTRING() method.
With objMessage
	.To       = "Terry Thurber <bos4@mindspring.com>"
	.From     = "<InControlMessage@r6solutions.com>"
	.Subject  = "ICM SMTP Relay Test" & REQUEST.QUERYSTRING("cBody")
	.TextBody = "SMTP Relay Test Sent @ " & Now() & REQUEST.QUERYSTRING("cBody")
	.Send
End With
>Thanks, do I need a Dim or REQUEST statement at the top of my ASP. The email is being sent, but theparameter is missing:
>&lt;%
>'==============================================================
>'myEmail.ASP
>'==============================================================
>Const cdoSendUsingMethod        = _
>	"http://schemas.microsoft.com/cdo/configuration/sendusing"
>' ... more CDODB ...
>Dim objConfig  ' As CDO.Configuration
>Dim objMessage ' As CDO.Message
>Dim Fields     ' As ADODB.Fields
>' Get a handle on the config object and it's fields
>Set objConfig = Server.CreateObject("CDO.Configuration")
>Set Fields = objConfig.Fields
>
>' Set config fields we care about
>With Fields
>	.Item(cdoSendUsingMethod)       = cdoSendUsingPort
>        ' .... more cdo message config
>	.Update
>End With
>Set objMessage = Server.CreateObject("CDO.Message")
>Set objMessage.Configuration = objConfig
>With objMessage
>	.To       = "Terry Thurber <bos4@mindspring.com>"
>	.From     = "<InControlMessage@r6solutions.com>"
>	.Subject  = "ICM SMTP Relay Test" & cBody
>	.TextBody = "SMTP Relay Test Sent @ " & Now() & cBody
>	.Send
>End With
>
>The mail is sent - but my cBody string is not showing up?
>Thanks
>
>>>I have code like this in a VFP desktop client :
>>>oHTTP=CREATEOBJECT("MSXML2.XMLHTTP")
>>>cSendBody=[ABCDYFUG]
>>>chur=[http://www.myWebSite.com/myEmail.asp?cBody=cSendBody]
>>>oHTTP.open([POST],chur,.f.)
>>>oHTTP.send()
>>>
>>>The ASP has a CDO mailer. My hope was to include cSendBody in the body of the message. The ASP page sends the mail - but it does not include the cBody.
>>>
>>>Is there something similar to a parameter statemet I need to use in the top of my ASP page.
>>>
>>>Thanks
>>
>>cSendBody is not visible as a varaible in the staatement above, try
>>
>>
>>chur=[http://www.myWebSite.com/myEmail.asp?cBody=]+cSendBody
>>
>>
>>Also, used encoded characters for CRLF (%0A%0D)
Greg Reichert
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform