Forum Moderators: open

Message Too Old, No Replies

ASP newbie

         

pcguru333

1:39 pm on Aug 14, 2002 (gmt 0)

10+ Year Member



I am an HTML/CSS guru but I am clueless when it comes to most scripting.

I have a form that I need to simply send via e-mail to my clients inbox when the submit button is clicked. His form resides on a IIS server with ASP.

How hard is it to script this on the page and where can I find the simplest tutorial for this?

Thanks

korkus2000

5:36 pm on Aug 14, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can also try putting this at the bottom of your original code to see what comes back.

<%
If Err <> 0 Then
Response.Write "Error encountered: " & Err.Description
End If
%>

Let us know how it goes.

pcguru333

5:37 pm on Aug 14, 2002 (gmt 0)

10+ Year Member



I haven't tried ASPEmail yet korkus

The error I got was

Error encountered: Object required

korkus2000

5:44 pm on Aug 14, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try adding:

objCDOMail.From = "dtaylor@phelpsdodge.com"

right above the objCDOMail.To in your original code. I am not sure if from is required in CDONTs.

pcguru333

5:49 pm on Aug 14, 2002 (gmt 0)

10+ Year Member



I added from to the script and the e-mail sent, still got the error but I am not to worried as it is doing what I want it to.

Thank you very much!

korkus2000

5:52 pm on Aug 14, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Maybe some better asp people than I will see this thread and let you know why you are getting that error.

aspdaddy

6:07 pm on Aug 14, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If Err <> 0 Then

Shouldnt that be Err.Number <> 0 ?

My guess - thats the error :)
<added>
Nope - thats fine!
</added>

Xoc

7:53 pm on Aug 14, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



To use Err effectively, you need to add this line to the beginning of the code:

On Error Resume Next

That tells it to ignore error, move on to the next line and fill in the Err object with the error that occurred.

Object required usually means that the object in the library you are trying to instantiate with Server.CreateObject is failing.

To use the CDONTS, the server must have SMTP installed. Go back to the Windows installation dialogs (from Add/Remove Software in control panel), and check the checkbox for SMTP.

aspdaddy

10:35 am on Aug 15, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>Object required usually means that the object in >the library you are trying to instantiate with >Server.CreateObject is failing.

I have to disagree - "Server.CreateObject Failed" is the error in this case. In my experience object required is usally caused by a syntax error.

This 38 message thread spans 2 pages: 38