I'm trying to use the CDO CreateMHTMLBody function to send a web page by e-mail, but I'm having trouble sending cookies to the target page. The contents of the page are determined by query variables, but I'm using cookies for forms-based authentication.
Here's my message-generating code:
sCookies = "foo=1;bar=2&bin=4;bas=3;"
url = "http://site/page.asp?PRM=3665
, 8926, 8926"
set objMessageConf = CreateObject("CDO.Configur
") = sCookies
Set objMessage = CreateObject("CDO.Message"
objMessage.Configuration = objMessageConf
objMessage.Subject = "Test Message sent at " & now()
objMessage.From = "firstname.lastname@example.org"
objMessage.To = "email@example.com"
Normally, the page being captured into e-mail would read these cookies with a line like this: (MGIS2004 is the name of my Application.)
For debugging, I have this code to dump all cookies instead:
public sub DumpVariables(coll)
if len(coll) > 0 then
Response.Write "<p class=""DebugInfo"">"
for each variable_name in coll
response.write variable_name &" = "
response.write variable_value &" <br>" &chr(13)
My resulting e-mail contains only:
Does anyone have any ideas why my cookies aren't coming across?