Thomas- I wrote this script roughly a year ago and it worked
perfectly fine until now. So I can assume CDOSYS is
available.
Problem:
Section 1 is hardcoded information:
Dim strTo1, strEmail, strFrom, strSubject
strTo1 = "(e-mail address removed)"
strEmail = "(e-mail address removed)"
Section 1a is read from the form
Dim strLogoPref, strComment1, strPool, strComment2,
strName, strEmail
strLogoPref = Request.Form("LogoPref")
strComment1 = Request.Form("Comment1")
strPool = Request.Form("Pool")
strComment2 = Request.Form("Comment2")
strName = Request.Form("Name")
strEmail = Request.Form("Email")
So he is re dimming strEmail, and the page will bomb there
Lessons to be learned-
1. Always define your variables in one location
2. Never put your email address in the credits. I can now
expect plenty of spam
3. Consult the person who wrote the script
: You need to checked with your web host to see if they
support CDOSYS and if not, what email
: component do they support.
:
: --
: ==============================================
: Thomas A. Rowe (Microsoft MVP - FrontPage)
: ==============================================
: If you feel your current issue is a results of installing
: a Service Pack or security update, please contact
: Microsoft Product Support Services:
:
http://support.microsoft.com
: If the problem can be shown to have been caused by a
: security update, then there is usually no charge for the
call.
: ==============================================
:
: "Fairfield Seniors" <
[email protected]>
wrote in message
: : > It just not work. Would not open after I took the
survey, with that new code added. Had to
: > delete that code to get it to work again.
: >
: > The set up descriptions does indicate it will allow for
additional email receivers.
: >
: >
: >
****************************************************************
: > ' *
*
: > ' * Questionnaire Results Mailer
*
: > ' *
*
: > ' * This script will assemble and send an email to the
email *
: > ' * addresses located in Part1 strTo and to the address
that *
: > ' * was entered in the Email field.
*
: > ' *
*
: > ' * This script may be freely redistributed or modified
as long *
: > ' * as this notice is in place
*
: > ' *
*
: > ' * Copyright 2004 Mike Mueller, Lannon Fire
Department *
: > ' *
www.lannonfire.com *
: > ' *
*
: > '
****************************************************************
: >
: > : >> Does email get sent to the first email address, but
just not to the second email address?
: >>
: >> --
: >> ==============================================
: >> Thomas A. Rowe (Microsoft MVP - FrontPage)
: >> ==============================================
: >> If you feel your current issue is a results of
installing
: >> a Service Pack or security update, please contact
: >> Microsoft Product Support Services:
: >>
http://support.microsoft.com
: >> If the problem can be shown to have been caused by a
: >> security update, then there is usually no charge for
the call.
: >> ==============================================
: >>
: >> "Fairfield Seniors" <
[email protected]>
wrote in message
: >> : >>> Thanks Tom:
: >>>
: >>> I beleave I inserting the code you indicated: however,
it did not work.
: >>> Here is how it looks now:
: >>>
: >>> Part 1: Set up the variables that will be hardcoded
: >>>
: >>> Dim strTo1, strEmail, strFrom, strSubject
: >>>
: >>> strTo1 = "(e-mail address removed)"
: >>> strEmail = "(e-mail address removed)"
: >>>
: >>> strFrom =
"(e-mail address removed)"
: >>> strSubject = "'s Response To Survey / Questionnaire"
: >>>
: >>> ' Part 1a: Set up the variables that
will be retrieved from your form
: >>>
: >>> Dim strLogoPref, strComment1, strPool, strComment2,
strName, strEmail
: >>>
: >>> strLogoPref = Request.Form("LogoPref")
: >>> strComment1 = Request.Form("Comment1")
: >>> strPool = Request.Form("Pool")
: >>> strComment2 = Request.Form("Comment2")
: >>> strName = Request.Form("Name")
: >>> strEmail = Request.Form("Email")
: >>>
: >>> strSubject = strName & strSubject
: >>>
: >>> ' Part2: Determine what logo they want
: >>> Dim strLogoChoice
: >>>
: >>> strLogoChoice = strLogoPref
: >>>
: >>>
: >>> ' Part 2a: Lets out the message
together from what we now know
: >>> Dim strMessageBody
: >>>
: >>> 'strMessageBody = strName &"'s selections from the
survey / questionnaire."& vbCrLF
: >>>
: >>> strMessageBody = strMessageBody & vbCrLF
: >>> strMessageBody = strMessageBody & vbCrLF
: >>> strMessageBody = strMessageBody & "Survey Question
Responses: "& vbCrLF
: >>> strMessageBody = strMessageBody & vbCrLF
: >>> strMessageBody = strMessageBody & vbCrLF
: >>> strMessageBody = strMessageBody & vbCrLF
: >>> strMessageBody = strMessageBody & vbCrLF
: >>> strMessageBody = strMessageBody &"Logo Selected: "&
strLogoChoice &"."& vbCrLF
: >>> strMessageBody = strMessageBody & vbCrLF
: >>> strMessageBody = strMessageBody & "Comments to
question 2: "& vbCrLF
: >>> strMessageBody = strMessageBody & "
"&strComment1 &vbCrLF
: >>> strMessageBody = strMessageBody & vbCrLF
: >>> strMessageBody = strMessageBody &"Pool Usage
Indicated: "& strPool &"."& vbCrLF
: >>> strMessageBody = strMessageBody & vbCrLF
: >>> strMessageBody = strMessageBody & "Comments to
question 4: "& vbCrLF
: >>> strMessageBody = strMessageBody & "
"&strComment2 &vbCrLF
: >>>
: >>> ' strMessageBody = strMessageBody &"Thank you
"&strName &" for taking the time to provide us
: >>> with your views."
: >>>
: >>>
: >>>
: >>> ' Part 3: Initialize the email
: >>>
: >>> Dim objMail
: >>>
: >>> Set objMail = Server.CreateObject("CDO.Message")
: >>>
: >>> ' Part 4: Populate the email with the
values from parts 1 & 2
: >>>
: >>> objMail.From = strFrom
: >>> objMail.To = strTo1
: >>>
: >>> objMail.CC = strEmail
: >>> objMail.Subject= strSubject
: >>> objMail.TextBody = strMessageBody
: >>>
: >>> ' Part 5: Send the email
: >>> objMail.Send
: >>>
: >>> ' Part 6: Clean-up mail object
: >>> Set objMail = Nothing
: >>> %>
: >>>
: >>>
: >>> : >>>> Dim strEmail
: >>>> strEmail = (e-mail address removed)
: >>>>
: >>>> Surround the emai address with quotes.
: >>>>
: >>>>
: >>>> --
: >>>> ==============================================
: >>>> Thomas A. Rowe (Microsoft MVP - FrontPage)
: >>>> ==============================================
: >>>> If you feel your current issue is a results of
installing
: >>>> a Service Pack or security update, please contact
: >>>> Microsoft Product Support Services:
: >>>>
http://support.microsoft.com
: >>>> If the problem can be shown to have been caused by a
: >>>> security update, then there is usually no charge for
the call.
: >>>> ==============================================
: >>>>
: >>>> "Fairfield Seniors"
: >>>> : >>>>> How do I go about fixing or adding code to add an
additional person to receive responses?
: >>>>>
: >>>>> Here is what I have now:
: >>>>>
: >>>>> Part 3: Initialize the email
: >>>>>
: >>>>> Dim objMail
: >>>>>
: >>>>> Set objMail = Server.CreateObject("CDO.Message")
: >>>>>
: >>>>> ' Part 4: Populate the email with the
values from parts 1 & 2
: >>>>>
: >>>>> objMail.From = strFrom
: >>>>> objMail.To = strTo1
: >>>>>
: >>>>> objMail.CC = strEmail
: >>>>> objMail.Subject= strSubject
: >>>>> objMail.TextBody = strMessageBody
: >>>>>
: >>>>> ' Part 5: Send the email
: >>>>> objMail.Send
: >>>>>
: >>>>> ' Part 6: Clean-up mail object
: >>>>> Set objMail = Nothing
: >>>>> %>
: >>>>>
: >>>>> Bill Cook
: >>>>>
: >>>>
: >>>>
: >>>
: >>>
: >>
: >>
: >
: >
:
: