Hi
I have been developing an application on a server at home, and then moved
it
to another at the office.A CDO send mail works fine at home, but sending
the ID read from the database at the office, at the end of the script
didn't
work. It was on IIS 5 at home and NT 4 IIS 4 on an alpha at work, so I
thought that was the problem. So I set up an Intel machine at the office
the
same as at home and it still didn't work, why?? I can't work it out.
My machine at home is INtel PIII 650, 512 mb,WIN 2K server SP1, with IIS 5
no update, Exchange 2K beta rc2, SQL 7.0 sp2 and pages written with
frontpage 2000. The script works on WIn2k and Win 98 machine at home.
Works machine PII 350, Win 2K server, SP1 Exchange Server eval. edition,
IIS 5 with(and tried without) Server extensions 1.3, Sql 7, SP2 and pages
edited with FP2000. The difference is the exchange server release, but
that
is acting as the smtp provider, the script isn't aware of the mail
transport provider, as far as I know.
Script is as follows
<p><%
Dim con
Dim rst
Const adOpenKeyset = 1
Const adLockOptimistic = 3
'Create the objects
Set con = Server.CreateObject("ADODB.Connection")
Set rst = Server.CreateObject("ADODB.Recordset")
con.Open "webdb", "sa", ""
' Create a keyset recordset based on the
' Faults table with optimistic locking
rst.Open "SELECT * FROM faults", con, _
adOpenKeyset, adLockOptimistic
' Create a new blank record
rst.AddNew
' Set the fields to the user-entered values
' from the html form used to collect the data
rst("UserName")=Request.Form("UserName")
rst("Location")=Request.Form("Location")
rst("Room")=Request.Form("Room")
rst("Nature")= Request.Form("Nature")
rst("Description")=Request.Form("Description")
rst("OS")= Request.Form("OS")
rst("Urgency")= Request.Form("Urgency")
rst("Completion")= Request.Form("Completion")
rst("Location")= Request.Form("Location")
rst("Time")= Now
rst("Closed")= "N"
' Save the new record to the database
rst.Update
Response.Write "<B>Thank you! you request will be dealt with as quickly as
possible</B>"
Dim objCDO
Set objCDO=Server.CreateObject("CDONTS.NewMail")
objCDO.To=("Helpdesk@X...")
objCDO.From= Request.form("UserName")
objCDO.Subject= Request.form("Nature")
objCDO.Body= "Click here to pick up this job" & vblf &
"http://alphadelta/open_job_form.asp?id=" & rst("id") & vbcrlf &
"Description of the job" & vbcrlf & Request.form("Description") & vbcrlf &
"Operating system" & vbcrlf & Request.form("OS") & vbcrlf & "Urgency" &
vbcrlf & Request.form("Urgency") & vbcrlf & "Required completion" & vbcrlf
&
Request.form("Completion")
objCDO.Send
rst.Close
con.Close
%> </p>
Resulting mail text at the office is
Click here to pick up this job
http://alphadelta/open_job_form.asp?id= the id should be here
Description of the job
heeellpppp
Operating system
Windows NT
Urgency
Executive
Required completion
Immediate
at home its like this
Click here to pick up this job
http://alphadelta/open_job_form.asp?id=23 id is sent
Description of the job
heeellpppp
Operating system
Windows NT
Urgency
Executive
Required completion
Immediate
Anyone see why it works on IIS5 at home but not at work, and why is works
on
IIS5 and not IIS4.
Thanks in advance
Ian