Wrox Programmer Forums
|
ASP CDO As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP CDO 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 March 22nd, 2004, 02:45 PM
Authorized User
 
Join Date: Mar 2004
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to stellabantug
Default Line breaks and Cc field

Imar-

This is the start of my new topic. Sorry for the inconvenience earlier but i really do appreciate all your help.

I have a Parsebody function that replaces all Chr(13) INTO <br> tags.

---------
Function ParseBody(strText)

   strText = Replace(strText, Chr(13), "<br>")

   ParseBody = strText

End Function
---------

At the end of my code, I have this:

---------
Response.Write(ParseBody(strBody))

--------

but it still would not work... the confirmation email does not have any line breaks.

As for the VPEmail being non-required, I have not changed anything from when I was using CDONTS. It was a non-required field, yet there was a Cc set up. And how does this explain the "to" (ReqEmail = required) field which has the same error message?

One more thing to think about, sometimes, the page would give me an error which is the following:

----------

Provider error '80004005'

Unspecified error

/OnlineForm/Email1.asp, line 71
 ---------

But when I refresh a few seconds after, it would give me the confirmation page. Do you know why this happens?



 
Old March 22nd, 2004, 02:50 PM
Authorized User
 
Join Date: Mar 2004
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to stellabantug
Default

BTW, the error message i get in the email is the following:

-----------
The following message arrived with illegal envelope data, typically a
mangled address that doesn't obey the RFC822/976 protocol specification.
If you do not recognize the source of the bad header, perhaps you should
contact a Postmaster at your site and ask why your mail was rejected.

Your message is being returned unprocessed.

The following annotated envelope headers illustrate the error(s):



Error in "to" envelope address:

<@advocatehealth.com>
                 ^-illegal token in route, expected word, illegal end of route address


Error in "Cc" header address:

<@advocatehealth.com>
                 ^-illegal token in route, expected word, illegal end of route address



The entire original message file follows.


 
Old March 22nd, 2004, 02:53 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Well, the problem is still the same: the To and CC addresses do not contain a valid e-mail address. The most obvious reason is that the form fields do not contain a valid value.

Does the code for the e-mail also run when the page loads the first time? If that is the case, it makes sense that the form fields are empty.

If that doesn't help, can you post the code for the entire page, changing any private or secure data? Can you spend some time formatting the code so we don't have to scroll like idiots to read it?

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old March 22nd, 2004, 03:15 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

One more thing. You said you used this:

Response.Write(ParseBody(strBody))


This sends the contents of strBody to the browser. How do you add the same text to the e-mail message? It somehow looks like you're mixing two things up; thinking that the entire page is now send as an e-mail message, or something like that.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old March 22nd, 2004, 03:46 PM
Authorized User
 
Join Date: Mar 2004
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to stellabantug
Default

I doubt that the "To" field is not valid because whenever I fill in the VPEmail address, then it runs correctly (and the only problem then that I have are the linebreaks).

But if I do not fill in the VPEmail, which is the CC field, then the error message above is sent, and it is an error on BOTH the "to" and "cc" field.

I changed the response.Write function into the following per instructions from a friend:

***
If strBody <> "" And Not IsNull(strBody) Then
 Response.Write( ParseBody(CStr(strBody)) )
End If
***

Below is my code. Its purpose is to simultaneously send the form results into a database and an email confirmation in addition to an HTML confirmation page as soon as the page is sent. I tried to reformat it, but I’m not sure how you want it to be. I took out all the notes and tried to make it as easy to read as possible. Please let me know specifically how you want me to post this if this is not good. THANKS SO MUCH for your patience and help.

***************************************
<%

Function ParseBody(strText)
    strText = Replace(strText, Chr(13), "<br>")
    ParseBody = strText
End Function


Dim myConnString
Dim myConnection
Dim mySQL


myConnString = Application("SampDatabConn_ConnectionString")

Set myConnection = Server.CreateObject("ADODB.Connection")

myConnection.Open myConnString


mySQL= "INSERT INTO ResearchInfo "
mySQL= mySQL & "(Name,Site,ReqEmail,VPEmail,Priority) "
mySQL= mySQL & "VALUES ('" & Replace(Request.Form ("Contact_FullName"), "'","''") & "'"
mySQL= mySQL & ",'" & Replace(Request.Form("Site"), "'", "''") & "'"
mySQL= mySQL & ",'" & Replace(Request.Form("ReqEmail"), "'","''") & "'"
mySQL= mySQL & ",'" & Replace(Request.Form("VPEmail"), "'", "''") & "'"
mySQL= mySQL & ",'" & Replace(Request.Form("PriorityDD"),"'","''") & "')"


myConnection.Execute mySQL
myConnection.Close

Set myConnection = Nothing

Dim objCDOSYSMail
Dim strFrom
Dim strTo
Dim strCc
Dim strBcc
Dim strSubject
Dim strBody


strFrom=Request.Form("ReqEmail")& "@advocatehealth.com"
strTo="[email protected]"

strSubject = "Research Request Confirmation Page"

strBody="The following information was submitted:" & Chr(13) & Chr(13)

If Trim(Request.Form("Contact_FullName"))<>"" Then
   strBody = strBody & "Requestor's Name: " & Request.Form("Contact_FullName") & Chr(13)
End If

If Trim(Request.Form("Site"))<>"" Then
   strBody = strBody & "Site: " & Request.Form("Site") & Chr(13)
End If

If Trim(Request.Form("ReqEmail"))<>"" Then
   strBody = strBody & "Requestor's Email: " & Request.Form("ReqEmail") & "@advocatehealth.com" & Chr(13)
End If

If Trim(Request.Form("VPEmail"))<>"" Then
   strBody = strBody & "VP's Email: " & Request.Form("VPEmail") & "@advocatehealth.com" & Chr(13)
End If

If Trim(Request.Form("PriorityDD"))<>"" Then
   strBody = strBody & "Priority: " & Request.Form("PriorityDD") & Chr(13)
End If

strBody = strBody & Chr(13) & Chr(13) & "Thank you for submitting your data."

strCc=Request.Form("VPEMail") & "@advocatehealth.com"
strBcc=Request.Form("ReqEmail") & "@advocatehealth.com"

Set objCDOSYSMail = Server.CreateObject("CDO.Message")

objCDOSYSMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = x
objCDOSYSMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "xxx.xxx.com"
objCDOSYSMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = xx
objCDOSYSMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = xx
objCDOSYSMail.Configuration.Fields.Update

objCDOSYSMail.From=strFrom
objCDOSYSMail.To=strTo
objCDOSYSMail.Bcc=strCc
objCDOSYSMail.Bcc=strBcc
objCDOSYSMail.Subject=strSubject
objCDOSYSMail.TextBody=strBody


objCDOSYSMail.Send

Set objCDOSYSMail = Nothing


%>
<p><b>Thank you for submitting your
Research Request!<br>
</b>You will receive an e-mail
shortly.&nbsp; The e-mail was sent using the following information:</p>
<b>Sent To:

<%

Response.Write Request.Form("ReqEmail") & "@advocatehealth.com"

%>

<br>
From&nbsp;&nbsp;&nbsp; : Research Team
<p>Subject: Research Request Confirmation Page</p>
<p>Content:

<%
If strBody <> "" And Not IsNull(strBody) Then
 Response.Write( ParseBody(CStr(strBody)) )
End If
%>

</p>

<p>&nbsp;</p>
</b>
******************************

THANKS AGAIN!

 
Old March 22nd, 2004, 03:51 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quick question: Does the page post to itself and did you leave that part out?? If another page posts to this page, can you post the code for that page too?

Formatting looks fine to me; there is no horizontal scroll bar....

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old March 22nd, 2004, 03:59 PM
Authorized User
 
Join Date: Mar 2004
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to stellabantug
Default

No, this ASP page is connected to another HTML page which is the body of the form. The code is posted below. There might be more fields in there because I just deleted the other fields from the previous post so as not to make it too long. I have never really dealt with the coding from this page since I use the wizards in the normal view. THANKS IMAR!

*****
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<META HTTP-EQUIV="Content-Language" CONTENT="en-us">
<TITLE>IndividualRequetForm</TITLE>
<meta name="Microsoft Theme" content="none, default">
</HEAD>
<BODY><p style="line-height: 100%" align="center"><b>&nbsp;Prospect Research Request
Form&nbsp;&nbsp;</b></p>
<p style="line-height: 100%" align="center"><b>&nbsp;&nbsp;
(Individual)</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;</p>

<P align="center">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Please fill in as much information as you can to better process your
request.&nbsp;&nbsp;</P>
<P align="center">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Highlighted text are required fields.</P>
<FORM METHOD="POST" ACTION="Email1.asp" onsubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1" language="JavaScript">
<BLOCKQUOTE>
<TABLE height="82" width="647">
<TR>
<TD ALIGN="right" height="25" width="371">
<EM>Requestor's Name</EM></TD>
<TD height="25" bgcolor="#FFFFFF" width="365">
<p style="color: #00FFFF"><span style="background-color: #00CCFF"><!--webbot
bot="Validation" S-Display-Name="Requestor's Name" B-Value-Required="TRUE" -->
<INPUT NAME="Contact_FullName" SIZE=44>
</span></p>
</TD>
</TR>
<TR>
<TD ALIGN="right" height="25" width="371">
<em>Site</em></TD>
<TD height="25" bgcolor="#FFFFFF" width="365"><!--webbot bot="Validation"
  S-Display-Name="Site" B-Value-Required="TRUE" I-Maximum-Length="25" -->
<INPUT NAME="Site" SIZE=44 MAXLENGTH=25>
</TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371">
<EM>Requestor's E-mail</EM></TD>
<TD height="26" bgcolor="#FFFFFF" width="365"><!--webbot bot="Validation"
  S-Display-Name="Requestor's Email" B-Value-Required="TRUE" --><input type="text" name="ReqEmail" size="26">@advocatehealth.com</TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371"><p>
<em>Your VP's E-mail</em></p>
</TD>
<TD height="26" bgcolor="#FFFFFF" width="365">
  <p>
<INPUT NAME="VPEmail" SIZE=26>@advocatehealth.com
  </p>
</TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371">&nbsp;&nbsp;&nbsp; <i>Priority</i>&nbsp;</TD>
<TD height="26" bgcolor="#FFFFFF" width="365"><!--webbot bot="Validation"
  S-Display-Name="Priority" B-Value-Required="TRUE" --><SELECT NAME="PriorityDD" size="1">
<OPTION SELECTED value="Low">Low
<OPTION value="Average">Average
<OPTION value="High">High</SELECT>
</TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371"><i>Research Needed By</i></TD>
<TD height="26" bgcolor="#FFFFFF" width="365" bordercolor="#990033"><!--webbot
  bot="Validation" S-Display-Name="Date Needed By" S-Data-Type="String"
  B-Allow-Digits="TRUE" S-Allow-Other-Chars="/" B-Value-Required="TRUE"
  I-Maximum-Length="10" --><INPUT NAME="DateNeededBy" SIZE=18 MAXLENGTH=10>&nbsp; <EM>-
  mm/dd/yyyy</EM></TD>
</TR>
<TR>
<TD ALIGN="right" height="20" width="371"><i> &nbsp;</i>
  <p><i> Prospect Name&nbsp;</i></p>
</TD>
<TD height="20" bgcolor="#FFFFFF" width="365" bordercolor="#990033">&nbsp;
  <p><!--webbot bot="Validation" S-Display-Name="Prospect Name"
  B-Value-Required="TRUE" --><INPUT NAME="ProspectName" SIZE=44></p>
</TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371"><i>
Constituent ID (if in RE)</i></TD>
<TD height="26" bgcolor="#FFFFFF" width="365" bordercolor="#FFFFFF"><INPUT NAME="ConstituentID" SIZE=44>
</TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371"><i>Address&nbsp;</i></TD>
<TD height="26" bgcolor="#FFFFFF" width="365" bordercolor="#FFFFFF"><INPUT NAME="Address" SIZE=44>
</TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371"><i>&nbsp;Phone Number (with area code)</i></TD>
<TD height="26" bgcolor="#FFFFFF" width="365" bordercolor="#FFFFFF"><INPUT NAME="PhoneNumber" SIZE=44>
</TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371">&nbsp;
  <p><i>Past Giving to Advocate?</i></p>
</TD>
<TD height="26" bgcolor="#FFFFFF" width="365" bordercolor="#FFFFFF">(i.e. (999)
  999-9999)
  <p><select size="1" name="PastGiving">
    <option value="Yes">Yes</option>
    <option value="No">No</option>
  </select></p>
</TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371"><i>(Advocate) Contact Name</i></TD>
<TD height="26" bgcolor="#FFFFFF" width="365" bordercolor="#FFFFFF"><input type="text" name="AdvocateContactName" size="44"></TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371"><i>Contact Title</i></TD>
<TD height="26" bgcolor="#FFFFFF" width="365" bordercolor="#FFFFFF"><input type="text" name="ContactTitle" size="44"></TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371"><i>Contact Phone Number (with area
  code)</i></TD>
<TD height="26" bgcolor="#FFFFFF" width="365" bordercolor="#FFFFFF"><input type="text" name="ContactPhone" size="44"></TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371">&nbsp;
  <p><i>Advocate Relationship (Board
  Member, etc.)</i></p>
</TD>
<TD height="26" bgcolor="#FFFFFF" width="365" bordercolor="#FFFFFF">(i.e. (999)
  999-9999)
  <p><input type="text" name="AdvocateRelationship" size="44"></p>
</TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371"><i>Research Needed For</i></TD>
<TD height="26" bgcolor="#FFFFFF" width="365" bordercolor="#FFFFFF"><!--webbot
  bot="Validation" S-Display-Name="Research Needed For" B-Value-Required="TRUE"
  --><select size="1" name="ResearchNeededFor">
    <option>Preliminary Evaluation</option>
    <option>Discovery Call</option>
    <option>Contact Call</option>
    <option>Cultivation</option>
    <option>Solicitation</option>
    <option>Strategy</option>
  </select></TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371"><i>Prospect's Moves Management Status</i></TD>
<TD height="26" bgcolor="#FFFFFF" width="365" bordercolor="#FFFFFF"><select size="1" name="MMStatus">
    <option>Identification</option>
    <option>Qualification</option>
    <option>Cultivation</option>
    <option>Solicitation</option>
    <option>Stewardship</option>
  </select></TD>
</TR>
</TABLE>
</BLOCKQUOTE>
<P>
&nbsp;&nbsp;&nbsp;<i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;
What information are you looking for? What questions do you want answered?</i></P>
<BLOCKQUOTE>
<P>
<!--webbot bot="Validation" S-Display-Name="Information/Questions"
B-Value-Required="TRUE" -->
<TEXTAREA NAME="Questions" ROWS=4 COLS=71></TEXTAREA>
</P>
<P>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;<i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Other relevant background and/or additional information:</i>
</P>
<P>
<textarea rows="4" name="OtherInfo" cols="71"></textarea>
</P>
<P>
&nbsp;&nbsp;&nbsp;<i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ; Include suggested people or resources to consult about this research request:</i>
</P>
<P>
<textarea rows="4" name="SuggestedResources" cols="71"></textarea>
</P>
<P>
&nbsp;
</P>
<P>
Please recheck the information that you have just entered.
</P>
<P>
Click &quot;Reset&quot; to start over, and &quot;Submit&quot; to submit
finalized request.
</P>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>
&nbsp;
</P>
</BLOCKQUOTE>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="mailto:[email protected]">
<INPUT TYPE=SUBMIT VALUE="Submit Form">
</a>
<INPUT TYPE=RESET VALUE="Reset Form">
<p>&nbsp;</p>
</FORM>

<H5><a href="mailto:[email protected]">Ste [email protected]</a><br>Copyright ©
2002 [Advocate Charitable Foundation]. All rights reserved. <BR>
</H5>
<p>&nbsp;
</p>
<p>&nbsp;</p>
</BODY>
</HTML>



 
Old March 22nd, 2004, 04:02 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Aaaaaaah, scrolling again.

Can you add a few enters here and there by editing your post? Just cut the long lines in multiple parts.
Since it's HTML, the formatting doesn't really matter much.

Cheers,

Imar - scrolling - Spaanjaars


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old March 22nd, 2004, 04:14 PM
Authorized User
 
Join Date: Mar 2004
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to stellabantug
Default

SORRY... let me try this again....

**********
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<META HTTP-EQUIV="Content-Language" CONTENT="en-us">
<TITLE>IndividualRequetForm</TITLE>
<meta name="Microsoft Theme" content="none, default">
</HEAD>
<BODY><p style="line-height: 100%" align="center"><b>&nbsp;Prospect Research Request
Form&nbsp;&nbsp;</b></p>
<p style="line-height: 100%" align="center"><b>&nbsp;&nbsp;
(Individual)</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;</p>

<P align="center">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Please fill in as much information as you can to better process your
request.&nbsp;&nbsp;</P>
<P align="center">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Highlighted text are required fields.</P>
<FORM METHOD="POST" ACTION="Email1.asp" onsubmit="return FrontPage_Form1_Validator(this)" name="FrontPage_Form1" language="JavaScript">
<BLOCKQUOTE>
<TABLE height="82" width="647">
<TR>
<TD ALIGN="right" height="25" width="371">
<EM>Requestor's Name</EM></TD>
<TD height="25" bgcolor="#FFFFFF" width="365">
<p style="color: #00FFFF"><span style="background-color: #00CCFF"><!--webbot
bot="Validation" S-Display-Name="Requestor's Name" B-Value-Required="TRUE" -->
<INPUT NAME="Contact_FullName" SIZE=44>
</span></p>
</TD>
</TR>
<TR>
<TD ALIGN="right" height="25" width="371">
<em>Site</em></TD>
<TD height="25" bgcolor="#FFFFFF" width="365"><!--webbot bot="Validation"
  S-Display-Name="Site" B-Value-Required="TRUE" I-Maximum-Length="25" -->
<INPUT NAME="Site" SIZE=44 MAXLENGTH=25>
</TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371">
<EM>Requestor's E-mail</EM></TD>
<TD height="26" bgcolor="#FFFFFF" width="365"><!--webbot bot="Validation"
  S-Display-Name="Requestor's Email" B-Value-Required="TRUE" --><input type="text" name="ReqEmail" size="26">@advocatehealth.com</TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371"><p>
<em>Your VP's E-mail</em></p>
</TD>
<TD height="26" bgcolor="#FFFFFF" width="365">
  <p>
<INPUT NAME="VPEmail" SIZE=26>@advocatehealth.com
  </p>
</TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371">&nbsp;&nbsp;&nbsp; <i>Priority</i>&nbsp;</TD>
<TD height="26" bgcolor="#FFFFFF" width="365"><!--webbot bot="Validation"
  S-Display-Name="Priority" B-Value-Required="TRUE" --><SELECT NAME="PriorityDD" size="1">
<OPTION SELECTED value="Low">Low
<OPTION value="Average">Average
<OPTION value="High">High</SELECT>
</TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371"><i>Research Needed By</i></TD>
<TD height="26" bgcolor="#FFFFFF" width="365" bordercolor="#990033"><!--webbot
  bot="Validation" S-Display-Name="Date Needed By" S-Data-Type="String"
  B-Allow-Digits="TRUE" S-Allow-Other-Chars="/" B-Value-Required="TRUE"
  I-Maximum-Length="10" --><INPUT NAME="DateNeededBy" SIZE=18 MAXLENGTH=10>&nbsp; <EM>-
  mm/dd/yyyy</EM></TD>
</TR>
<TR>
<TD ALIGN="right" height="20" width="371"><i> &nbsp;</i>
  <p><i> Prospect Name&nbsp;</i></p>
</TD>
<TD height="20" bgcolor="#FFFFFF" width="365" bordercolor="#990033">&nbsp;
  <p><!--webbot bot="Validation" S-Display-Name="Prospect Name"
  B-Value-Required="TRUE" --><INPUT NAME="ProspectName" SIZE=44></p>
</TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371"><i>
Constituent ID (if in RE)</i></TD>
<TD height="26" bgcolor="#FFFFFF" width="365" bordercolor="#FFFFFF"><INPUT NAME="ConstituentID" SIZE=44>
</TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371"><i>Address&nbsp;</i></TD>
<TD height="26" bgcolor="#FFFFFF" width="365" bordercolor="#FFFFFF"><INPUT NAME="Address" SIZE=44>
</TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371"><i>&nbsp;Phone Number (with area code)</i></TD>
<TD height="26" bgcolor="#FFFFFF" width="365" bordercolor="#FFFFFF"><INPUT NAME="PhoneNumber" SIZE=44>
</TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371">&nbsp;
  <p><i>Past Giving to Advocate?</i></p>
</TD>
<TD height="26" bgcolor="#FFFFFF" width="365" bordercolor="#FFFFFF">(i.e. (999)
  999-9999)
  <p><select size="1" name="PastGiving">
    <option value="Yes">Yes</option>
    <option value="No">No</option>
  </select></p>
</TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371"><i>(Advocate) Contact Name</i></TD>
<TD height="26" bgcolor="#FFFFFF" width="365" bordercolor="#FFFFFF"><input type="text" name="AdvocateContactName" size="44"></TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371"><i>Contact Title</i></TD>
<TD height="26" bgcolor="#FFFFFF" width="365" bordercolor="#FFFFFF"><input type="text" name="ContactTitle" size="44"></TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371"><i>Contact Phone Number (with area
  code)</i></TD>
<TD height="26" bgcolor="#FFFFFF" width="365" bordercolor="#FFFFFF"><input type="text" name="ContactPhone" size="44"></TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371">&nbsp;
  <p><i>Advocate Relationship (Board
  Member, etc.)</i></p>
</TD>
<TD height="26" bgcolor="#FFFFFF" width="365" bordercolor="#FFFFFF">(i.e. (999)
  999-9999)
  <p><input type="text" name="AdvocateRelationship" size="44"></p>
</TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371"><i>Research Needed For</i></TD>
<TD height="26" bgcolor="#FFFFFF" width="365" bordercolor="#FFFFFF"><!--webbot
  bot="Validation" S-Display-Name="Research Needed For" B-Value-Required="TRUE"
  --><select size="1" name="ResearchNeededFor">
    <option>Preliminary Evaluation</option>
    <option>Discovery Call</option>
    <option>Contact Call</option>
    <option>Cultivation</option>
    <option>Solicitation</option>
    <option>Strategy</option>
  </select></TD>
</TR>
<TR>
<TD ALIGN="right" height="26" width="371"><i>Prospect's Moves Management Status</i></TD>
<TD height="26" bgcolor="#FFFFFF" width="365" bordercolor="#FFFFFF"><select size="1" name="MMStatus">
    <option>Identification</option>
    <option>Qualification</option>
    <option>Cultivation</option>
    <option>Solicitation</option>
    <option>Stewardship</option>
  </select></TD>
</TR>
</TABLE>
</BLOCKQUOTE>
<P>
&nbsp;&nbsp;&nbsp;<i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;
What information are you looking for? What questions do you want answered?</i></P>
<BLOCKQUOTE>
<P>
<!--webbot bot="Validation" S-Display-Name="Information/Questions"
B-Value-Required="TRUE" -->
<TEXTAREA NAME="Questions" ROWS=4 COLS=71></TEXTAREA>
</P>
<P>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;<i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Other relevant background and/or additional information:</i>
</P>
<P>
<textarea rows="4" name="OtherInfo" cols="71"></textarea>
</P>
<P>
&nbsp;&nbsp;&nbsp;<i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ; Include suggested people or resources to consult about this research request:</i>
</P>
<P>
<textarea rows="4" name="SuggestedResources" cols="71"></textarea>
</P>
<P>
&nbsp;
</P>
<P>
Please recheck the information that you have just entered.
</P>
<P>
Click &quot;Reset&quot; to start over, and &quot;Submit&quot; to submit
finalized request.
</P>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P>
&nbsp;
</P>
</BLOCKQUOTE>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="mailto:[email protected]">
<INPUT TYPE=SUBMIT VALUE="Submit Form">
</a>
<INPUT TYPE=RESET VALUE="Reset Form">
<p>&nbsp;</p>
</FORM>

<H5><a href="mailto:[email protected]">Ste [email protected]</a><br>Copyright ©
2002 [Advocate Charitable Foundation]. All rights reserved. <BR>
</H5>
<p>&nbsp;
</p>
<p>&nbsp;</p>
</BODY>
</HTML>



 
Old March 22nd, 2004, 04:26 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

OK, I took another look, and saw this:
Code:
objCDOSYSMail.From=strFrom
objCDOSYSMail.To=strTo
objCDOSYSMail.Bcc=strCc
objCDOSYSMail.Bcc=strBcc
You are assigning the CC string to the BCC field as well. I am not 100% into the mail RFCs, but this may explain why you get an error on the To field as well.

Anyway, to prevent all problems, how about this. Just attach a CC field when the user actually typed on in:
Code:
If Request.Form("VPEMail") & "" <> "" Then
  strCc=Request.Form("VPEMail") & "@advocatehealth.com"
Else
  strCc = ""
End If

...

objCDOSYSMail.From = strFrom
objCDOSYSMail.To = strTo
If strCc <> "" Then
  objCDOSYSMail.Cc = strCc
End If
objCDOSYSMail.Bcc = strBcc
objCDOSYSMail.Subject = strSubject
...
This way, you only try to add the CC field when it has been entered.
You could repeat this for the To and Bcc fields as well, and reject the form when the required fields haven't been filled it.

I recommend again to remove your e-mail address from this and older topic (unless they are fake, which I doubt). You can't sue Wrox when you start getting spam on the e-mail accounts you post here.
I used to add my e-mail address in posts at the old P2P, and now I get up to 250 spam e-mails a day on that account.... :-(

Reformatting the message didn't really help. You can use the Preview button right below the text area where you type your message. When the preview window has a scrollbar at the bottom, your page is too wide, and you need to add some linebreaks.
SInce the text area automatically wraps the text, you cannot not assume that if it fits in the text area, it will also fit on the page.

Maybe it's time for a <div> with an overflow set to scroll / auto / whatever, so just the message will scroll, instead of the entire page, including the message editor....

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
line breaks mister_mister XSLT 14 March 17th, 2008 12:55 PM
How to do line breaks! Apocolypse2005 Beginning VB 6 2 December 11th, 2006 03:20 PM
Line breaks question gkirk Beginning PHP 2 February 27th, 2005 10:40 AM
line breaks in MySQL field? Tachyon PHP Databases 3 May 21st, 2004 06:03 PM





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