Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

script which use to run in IIS 6 will not run in IIS 7,5

Status
Not open for further replies.

basball

Technical User
Dec 18, 2002
192
US
I've confirmed that the ASP feature I've added works with a sample asp page.

The following is no longer working and I can't figure out what might be wrong :(

It's a simple file I used for mail handling.

<div align="center">Submission Sent</div>
<div align="center"><% = Now %>
<p><a href="../default.htm"><img src="../Common/Buttons/1-button.gif" width="64" height="24" border="0"></a></p>
</div>
<%
'Declare local variables to hold the data from the Input form page that is used above.

Dim strTo
Dim strSubject
Dim strBody 'Strings for recipient, subject, body
Dim objCDOMail 'The CDO object
crlf = CHR(13) + CHR(10) 'crlf = CHR(13) + CHR(10) is just a carriage return.

'First we'll read in the values entered from the form into the Local variables
strFrom = "Website" 'Make sure the From field has no spaces.
strTo = "avram.berman@ajba.com"
strSubject = "Sales Lead"
strBody = Request.Form("body")_
&"des: "&Request.Form("des")_
&crlf&"bus: "&Request.Form("bus")_
&crlf&"res: "&Request.Form("res")_
&crlf&"listajb: "&Request.Form("listajb")_
&crlf&"listyou: "&Request.Form("listyou")_
&crlf&"month: "&Request.Form("month")_
&crlf&"day: "&Request.Form("day")_
&crlf&"year: "&Request.Form("year")_
&crlf&"time: "&Request.Form("time")_
&crlf&"meet: "&Request.Form("meet")_
&crlf&"quote: "&Request.Form("quote")_
&crlf&"sale: "&Request.Form("sale")_
&crlf&"survey: "&Request.Form("survey")_
&crlf&"cc: "&Request.Form("cc")_
&crlf&"reg: "&Request.Form("reg")_
&crlf&"oth: "&Request.Form("oth")_
&crlf&"name: "&Request.Form("name")_
&crlf&"firm: "&Request.Form("firm")_
&crlf&"phone: "&Request.Form("phone")_
&crlf&"fax: "&Request.Form("fax")_
&crlf&"email: "&Request.Form("email")_
&crlf&"web: "&Request.Form("web")

' Create an instance of the NewMail object.
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")

' Set the properties of the object
objCDOMail.From = StrFrom
objCDOMail.To = strTo
objCDOMail.Subject = strSubject
objCDOMail.Body = strBody

' There are lots of other properties you can use.
' You can send HTML e-mail, attachments, etc...
' You can also modify most aspects of the message
' like importance, custom headers, ...
' Check the help files for a full list as well
' and the correct syntax.

' Some of the more useful ones I've included samples of here:
'objCDOMail.Cc = "mailto:sschofield@aspfree.com;steve@aspfree.com" Notice this sending to more than one person!
'objCDOMail.Bcc = "sschofield@aspfree.com;steve@aspfree.com"
'objCDOMail.Importance = 1 '(0=Low, 1=Normal, 2=High)im a
'objCDOMail.AttachFile "c:\path\filename.txt", "filename.txt"

' Send the message!
objCDOMail.Send

' Set the object to nothing because it immediately becomes
' invalid after calling the Send method + it clears it out of the Server's Memory.
Set objCDOMail = Nothing
%>
<div align="center"></div>
 
I now realize that I don't have cdnots.dll installed and it's been depreciated.

with that being said, does anyone want to show me how to convert the following
to use cdosys - please :)

<div align="center">Submission Sent</div>
<div align="center"><% = Now %>
<p><a href="../default.htm"><img src="../Common/Buttons/1-button.gif" width="64" height="24" border="0"></a></p>
</div>
<%

Dim strTo
Dim strSubject
Dim strBody 'Strings for recipient, subject, body
Dim objCDOMail 'The CDO object
crlf = CHR(13) + CHR(10)


strFrom = "Website" 'Make sure the From field has no spaces.
strTo = "avram.berman@ajba.com"
strSubject = "Sales Lead"
strBody = Request.Form("body")_
&"des: "&Request.Form("des")_
&crlf&"bus: "&Request.Form("bus")_
&crlf&"res: "&Request.Form("res")_
&crlf&"listajb: "&Request.Form("listajb")_
&crlf&"listyou: "&Request.Form("listyou")_
&crlf&"month: "&Request.Form("month")_
&crlf&"day: "&Request.Form("day")_
&crlf&"year: "&Request.Form("year")_
&crlf&"time: "&Request.Form("time")_
&crlf&"meet: "&Request.Form("meet")_
&crlf&"quote: "&Request.Form("quote")_
&crlf&"sale: "&Request.Form("sale")_
&crlf&"survey: "&Request.Form("survey")_
&crlf&"cc: "&Request.Form("cc")_
&crlf&"reg: "&Request.Form("reg")_
&crlf&"oth: "&Request.Form("oth")_
&crlf&"name: "&Request.Form("name")_
&crlf&"firm: "&Request.Form("firm")_
&crlf&"phone: "&Request.Form("phone")_
&crlf&"fax: "&Request.Form("fax")_
&crlf&"email: "&Request.Form("email")_
&crlf&"web: "&Request.Form("web")

Set objCDOMail = Server.CreateObject("CDONTS.NewMail")

objCDOMail.From = StrFrom
objCDOMail.To = strTo
objCDOMail.Subject = strSubject
objCDOMail.Body = strBody

objCDOMail.Send

Set objCDOMail = Nothing
%>
<div align="center"></div>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top