• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 286
  • Last Modified:

Having problem sending form data through an email

After I filling out a form I want to send the form's data by an email so I used the following code:

' Line 479 below
Set Mailer = Server.CreateObject("ASPMail.ASPMailCtrl.1")        

recipient = strTo
sender = strFrom
subject = "Crooked Creek Golf: Online Request for Reservation Form"
mailserver = "pop3.vnet.com.br"
message = strBody
result = Mailer.SendMail(mailserver, recipient, sender, subject, message)

But as a response I got a message error that is :

What should I do ?
Server object error 'ASP 0177 : 800401f3'
                   Server.CreateObject Failed
           /ListadeComprasFlushop.asp, line 479
                          Invalid class string
0
gferro
Asked:
gferro
  • 3
  • 2
  • 2
1 Solution
 
manojaminCommented:
try this...

Set Mailer = Server.CreateObject("ASPMail.ASPMailCtrl")  

also read this,
Here, There, and Virtually Anywhere
http://msdn.microsoft.com/workshop/essentials/webmen/webmen070698.asp

the text is below...

Dear Web Men:

We are an educational site that would like to make ASP files for our Web site so we can access databases and create active content. However, whenever we try to establish a connection with the database, we receive this error. We read through any help articles we could find on your site, but none of the suggestions seemed to work. We would appreciate any help that you can provide.

Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/Calendar/tblEvents.asp, line 16
Invalid class string
Ernest Dotson

The Web Men reply:

As the error message indicates, there seems to be a problem with the string you are passing to the CreateObject method. The string you pass to the method is the class name or ProgID (programmatic identifier) of the COM object you want to create. Whatever you are passing in the string is not a COM object that Active Server Pages (ASP) technology recognizes.

To access databases with ASP, you use ActiveX Data Objects (ADO). With ADO, you can create a connection to a database using a Connection object. The following ASP script shows how to create a Connection object:

<%
objConn = Server.CreateObject("ADODB.Connection")
%>
Once you create the Connection object, you use its Open method to create the connection the database.

Working with databases is described in the ASP tutorial included in the Internet Information Server (IIS) 4.0 documentation. Check out Lesson 3: Using the Database Access Component of Module 2: Using ActiveX Components. For more code examples, take a look at the Database Connectivity section in Developer Samples.

If you continue to run into problems, and you're sure your ASP script is correct, and your database is set up properly, you could run the Windows NT Option Pack setup program again, and reinstall the Microsoft Data Access Components.


0
 
manojaminCommented:
Also make sure that you see this in the registry...

HKEY_CLASSES_ROOT\ASPMail.ASPMailCtrl

use regedit to check this...

0
 
gferroAuthor Commented:
I didn't understand what you meant with
 "Also make sure that you see this in the registry...
 HKEY_CLASSES_ROOT\ASPMail.ASPMailCtrl
use regedit to check this...  "

I've changed the code line
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
gferroAuthor Commented:
I didn't understand what you meant with
 "Also make sure that you see this in the registry...
 HKEY_CLASSES_ROOT\ASPMail.ASPMailCtrl
use regedit to check this...  "

I've changed the code line
0
 
manojaminCommented:
All the ActiveX components are registered in the registry. The call that you are using,

Server.CreateObject("progID") looks into the registry under HKEY_CLASSES_ROOT hive.

over here, your program ID is "ASPMail.ASPMailCtrl", therefore, the CreateObject will go and check CLSID under this key,

HKEY_CLASSES_ROOT\ASPMail.ASPMailCtrl

Now, the CLSID value under

HKEY_CLASSES_ROOT\CLSID\{nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn}\

(where, n stands for hexadecimal number (could be from 0 to 9, and A- F))

will have all the necessary information for that dll, incuding the path of the dll, threading model, ProgID etc...

What I meant is that, check the registry and make sure that you are using the right ProgID key...

i.e. ASPMail.ASPMailCtrl

Also, check the ProgId's default value under

HKEY_CLASSES_ROOT\CLSID\{nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn}\

and make sure that value matches too... ignore any number after ASPMail.ASPMailCtrl.n (i.e. n, n stands for the current version number, you should not worry about that)


(where {nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn} is the CLSID (class ID) of your dll)

I hope this not confusing....
0
 
lui_angCommented:
I believe you are trying to use the OCXmail ASP component. This component was developed by Flicks Software (http://www.flicks.com)(This web site was down last time I checked it). You have to buy and install this component before you can use it in your ASP page.

Check out these web pages
1)http://www.15seconds.com/component/pg002058.htm
2) http://www.15seconds.com/component/pg002853.htm

Alternatively, you can use other mailer components which are free.
I suggest using Dimac's w3 JMail component.

This is available through http://tech.dimac.net

0
 
lui_angCommented:
Just checked www.flicks.com and found out that their website is up.

I made a mistake in my previous comment.
It turns out that OCXmail can be obtained for free but "the free version includes a tag line at the end of each message sent."

You can request for the free OCXmail through
http://www.flicks.com/ASPMail/

and

The complete documentation for OCXmail can be found at
http://www.flicks.com/ASPMail/aspmailref.htm

0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now