PDA

View Full Version : asp issue


dreamlynx
12-27-2005, 05:05 PM
Okay I am normally pretty good with this stuff bu this one is getting under the skin.
Mayber creative or mike can help.

I am building a confirmation page that will display and email the persons information to them when the registration is complete.

I am using sendmail.asp with CDONTS fully shared and operational. I can send emails with the contact for just fine.

but i keep getting this error on the confirmation page i'm trying to make.

Server object, ASP 0177 (0x800401F3)
Invalid class string
/test2.asp, line 11

code------------------

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/test.asp" -->
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Session("SVusername") <> "") Then
Recordset1__MMColParam = Session("SVusername")
End If
%>
<%
Set Mail = Server.CreateObject("CDONTS.Mailer") <---this is line 11-----

Mail.Host = "localhost" ' enter valid SMTP host
Mail.From = "dserrano@dreamlynxdst.com" ' From email address
Mail.FromName = "Florida Pre Fab" ' optional
Mail.Username = "email address associated with domain name"
Mail.Password = "password of email associated with domain name"
Mail.AddAddress recordset1.Fields.Item("email").Value
Mail.Subject = "Florida Pre Fab > Thanks for registering!"
Mail.Body = "username: " & recordset1.Fields.Item("username").Value & vbcrlf & "password: " & recordset1.Fields.Item("password").Value & vbcrlf & "email: " & recordset1.Fields.Item("email").Value

Mail.Send ' send message
Set Mail = Nothing ' destory Mail object
Session.Contents.Remove("SVusername")
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>

<body>


reg confirm</p>


</p>


<%=(Recordset1.Fields.Item("FirstName").Value)%></p>


<%=(Recordset1.Fields.Item("LastName").Value)%></p>


<%=(Recordset1.Fields.Item("email").Value)%></p>


<%=(Recordset1.Fields.Item("username").Value)%></p>


<%=(Recordset1.Fields.Item("password").Value)%></p>


</p>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>

I would appreciate any help.

Thanks in advance,
Dreamlynx

dreamlynx
12-27-2005, 07:49 PM
guess no one knows the answer huh

Creative Insanity
12-27-2005, 08:01 PM
Not many here do ASP due to his high costs on hosting.

dreamlynx
12-27-2005, 08:42 PM
Thanks Mate at least now i know why no was answering the bloody question

Creative Insanity
12-27-2005, 08:54 PM
I am not saying no one will. It may take a bit though due to the session.
I am taking it that the local server is setup on your system, if so have you also got an email server setup as I see you have it set to localhost.

Also if this is on a hoster.. should not the host be your URL rather than localhost

I mean something like
mail.domain.com

dreamlynx
12-28-2005, 12:30 AM
yes it's hosted locally. And i figured ou the problem. Thanks for the help though
Dreamlynx

Creative Insanity
12-28-2005, 12:43 AM
would be nice to say what the problem was so it may help others in the future. ;)

davidj
12-28-2005, 09:38 AM
cdonts dll may not be registered

Download CDONTS.DLL into: c:\windows\system32 (see below)

Registor cdonts.dll

Go in to DOS

Go to the System32 Folder (at the blinking cursor type: CD \windows\system32 and hit [Enter])

At the blinking cursor type: RegSvr32 cdonts.dll

Creative Insanity
12-28-2005, 09:40 AM
Go in to DOS (Start->All Programs->Accessories->Command Prompt)
or just start run and enter cmd and press enter.

dreamlynx
12-28-2005, 06:27 PM
Thanks guys i got it fixed. Here's the problem. The cdonts was fine, it was the the way the code was writen was improper. Heres what it should have been.

<%
Set Mail = Server.CreateObject("Persits.MailSender") <---- this is correct.

Mail.Host = "localhost" ' enter valid SMTP host
Mail.From = "info@floridaprefab.com" ' From email address
Mail.FromName = "Florida Pre Fab" ' optional
Mail.Username = "email address associated with domain name"
Mail.Password = "password of email associated with domain name"
Mail.AddAddress Recordset1.Fields.Item("email").Value
Mail.Subject = "Florida Pre Fab > Thanks for registering!"
Mail.Body = "username: " & Recordset1.Fields.Item("username").Value & vbcrlf & "password: " & Recordset1.Fields.Item("password").Value & vbcrlf & "email: " & Recordset1.Fields.Item("email").Value

Mail.Send ' send message
Set Mail = Nothing ' destory Mail object
Session.Contents.Remove("SVusername")
%>

also, if you are using aspemail on your local server then you need to configure it to run on the localhost smtp 25. I had it set for DNS so it was looking for the wrong server.

But Thanks everyone for the suggestions.

Also if anyone ever needs help in 3D software such as Maya or 3d Max i'm you man.

Swishmax and flash to.

Thanks
dreamlynx