Wrox Programmer Forums
|
Classic ASP Components Discussions specific to components in ASP 3.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 21st, 2008, 04:03 PM
Authorized User
 
Join Date: Jan 2008
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default Can't send form values using CDO

Gang:

Here is code:

<%
 msgSubject = "test"
 msgBody = Request.form("WebsiteAddress")
 sch = "http://schemas.microsoft.com/cdo/configuration/"
 set cdoConfig = CreateObject("CDO.Configuration")
 With cdoConfig.Fields
  .Item(sch & "sendusing") = 2 ' cdoSendUsingPort
  .Item(sch & "smtpserver") = "IP ADDR"
  .update
 End With
 Set cdoMessage = CreateObject("CDO.Message")
 With cdoMessage
  set .Configuration = cdoConfig
  .From = ""
  .To = "EM ADDR"
' .Cc = ""
  .Subject = msgSubject
  .TextBody = msgBody
  .Send
 End With
 set cdoMessage = Nothing
 set cdoConfig = Nothing
%>

I can send text, but not form values. What am I missing?

Thank you in advance for prompt professional reply.
 
Old February 27th, 2008, 03:55 PM
Authorized User
 
Join Date: Jan 2008
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank me for the answer. Pats self on back ... LOL

Here's answer ...

Chk form type not set to text/plain (legacy code) & ...

For i = 1 to request.form.count - 1 'skip submit btn
FieldName = request.form.key(i)
FieldValue = request.form.item(i)
body = body & FieldName & " = " & FieldValue & VbCrLf
Next
msgBody = body
response.write(body)
response.write("<br><br><br>")





Similar Threads
Thread Thread Starter Forum Replies Last Post
Send Digitally-signed CDO emails kieronmc Classic ASP Professional 1 May 25th, 2006 08:08 AM
how to send HTML email by using CDO.Message ittech Classic ASP Basics 2 January 10th, 2006 06:49 PM
send form values to different page hastikeyvan Dreamweaver (all versions) 24 August 29th, 2005 04:10 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.