Click to See Complete Forum and Search --> : Server.CreateObject Failed


GRAPHICCHIK
06-19-2007, 12:20 PM
i am trying to create a simple asp guestbook and I have no clue what this means... nor do i know how to fix it.

HELP!!!

please :-)

TheBearMay
06-19-2007, 12:38 PM
Can you show us some code?

GRAPHICCHIK
06-19-2007, 01:09 PM
this is the whole thank_you.asp file:
<%@ LANGUAGE="VBSCRIPT" %>

<!--- This example illustrates the use of a "thank you" note after submitting a form --->

<HTML>
<HEAD>
<TITLE>ASP Guestbook Thank You</TITLE>
</HEAD>

<BODY>
Thanks for filling out our survey, <%=Request.form("yourname")%>.

<!-- The following area delineates and sends mail -->

<P>
<%

' Set up variables to hold the text strings
Dim DestinationEmail
Dim OriginatingEmail
Dim Subject
Dim Body


' assign text to the variable
OriginatingEmail = Request.form("email")
DestinationEmail = "jndglobal@gmail.com"
Subject = "Comments from page"

' The body contains all the form data separated by semicolons
Body = "Name = " & Request.form("yourname") & "; Email Address = " & Request.form("email") & "; Answer = " & Request.form("answer")

' Send email via the SendMail utility...note that this is an add-on to Active Server Pages and needs to be installed separatelly on the server.
Set email = Server.CreateObject("MPS.SendMail")
retCode = email.SendMail(OriginatingEmail, DestinationEmail, Subject, Body)

' Posts if mail has been sent or not
IF NOT True = retCode THEN
Response.write("Failed to send form results to "&DestinationEmail&" due to "&Err.Description&".<P>")
ELSE
Response.write("Your form Results have been sent.<P>")
END IF

' Posts answer depending on radio button choice
IF Request.form("answer") = "yes" THEN
Response.write("I like Active Server Pages Too!")
ELSE
Response.write("I don't like Active Server Pages either!")
END IF
%>
</BODY>
</HTML>



This is the whole guestbook_template.asp file:

<%@ LANGUAGE="VBSCRIPT" %>

<!--- This example illustrates the use of a "thank you" note after submitting a form --->

<HTML>
<HEAD>
<TITLE>Guestbook Template</TITLE>
</HEAD>

<BODY>
We want to see how popular Active Server Pages are.
<BR>
Please help us by filling out our survey.
<P>
<FORM ACTION="thank_you.asp" NAME="form1" METHOD="post">

Name: <INPUT TYPE="text" SIZE=30 NAME="yourname">
<P>
Email Address: <INPUT TYPE="text" SIZE=30 NAME="email">
<P>
Do you like Active Server Pages?
<INPUT TYPE="radio" NAME="answer" VALUE="yes" CHECKED> Yes
<INPUT TYPE="radio" NAME="answer" VALUE="no">No
<P>
<INPUT TYPE="submit" VALUE="Submit Survey">

</FORM>

</BODY>
</HTML>

Thankyou... in advance!

GRAPHICCHIK
06-19-2007, 01:10 PM
and i am getting this error:

Thanks for filling out our survey, .

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/cgi-bin/thank_you.asp, line 34

800401f3

lmf232s
06-19-2007, 02:15 PM
It look like it cant create the MPS.SendMail object.
Do you have this installed on the server?

GRAPHICCHIK
06-19-2007, 02:19 PM
i don think so... Hmmm :-? do you know how I can install it?

lmf232s
06-19-2007, 02:51 PM
Well i dont know what MPS is. Can you tell me what it is.
Is there any reason why your using the MPS object to send mail?
Are you hosting this site or is it hosted by someone else? If someone else you would then need to contact them to see about getting the right component installed on the server but again I dont know what MPS is.

Have you looked at CDO?
http://www.w3schools.com/asp/asp_send_email.asp

GRAPHICCHIK
06-19-2007, 07:18 PM
i checked it out... didn't help me... but i looked into something else and now im not getting an email... everything seems to go thru but no email :-? i feel like giving up :-(

--------------

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>


<%
Set objMail = Server.CreateObject("CDO.Message")

objMail.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objMail.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"


objMail.From = "wishes6336@yahoo.com" ' change this to an email address
objMail.To = "jndglobal@gmail.com" ' change this to your email address
objMail.Subject = "Subject" ' change this to your subject
'Set the e-mail body format (HTMLBody=HTML TextBody=Plain)

'Set the e-mail body format (HTMLBody=HTML TextBody=Plain)
objMail.HTMLBody = "<font size=2 face=verdana>"
objMail.HTMLBody = objMail.HTMLBody & Replace(Request.Form("Details"), vbCrLf, "<br />") & "<br>" & "<br>"
objMail.HTMLBody = objMail.HTMLBody & "from " & "<strong>" & Request.form("Name") & "</strong>" & "<br>"
objMail.HTMLBody = objMail.HTMLBody & "<strong>" & "Email: " & "</strong>" & Request.Form("Email") & "<br>"
objMail.HTMLBody = objMail.HTMLBody & "Sent at " & Now() & "</font>"

objMail.Send()

Set objMail = Nothing

%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Thank you</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="http://www.jndcreativegroup.com/styles.css" rel="stylesheet" type="text/css" />
</head>

<body>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" class="spacedtable">
<tr>
<td valign="top"><h1 class="pageheading">Thank
you <%= Request.Form("Name")%></h1>
<p class="text"><strong>You wrote</strong></p>
<p class="text"><%=Replace(Request.Form("Details"), vbCrLf, "<br>")%></p>
<p class="text">We will receive your message soon, and reply to you at <strong><%= Request.Form("Email")%></strong></p></td>
</tr>
</table>
<!-- start of table containg top of page link and company copyright -->
<br />
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" class="basebar" summary="the first cell contains a link to the top of this page, the second cell contains the copyright and link to the developers website.">
<tr>
<td width="31%" align="center" nowrap="nowrap"><a href="#mainpage" title="return to the top of this page">Top of Page</a></td>
<td width="69%" align="center" nowrap="nowrap">Designed and Developed by © <a href="http://www.cgw3.co.uk" target="_blank" title="cg webdevelopment website - opens in a new window">CG Webdevelopment</a>
<% =year(now) %>
</td>
</tr>
</table>
<!-- end of table containg top of page link and company copyright -->
</body>
</html>

Terrorke
06-20-2007, 01:40 AM
Have you registred the component on your server?

Maybe you should try using another emailcomponent and see if that works

GRAPHICCHIK
06-20-2007, 10:25 AM
no... i dont understand these components... how do I register one?