View Single Post
  #1 (permalink)  
Old October 18th, 2009, 05:58 PM
futurehype futurehype is offline
Authorized User
Join Date: Oct 2009
Posts: 10
Thanks: 6
Thanked 1 Time in 1 Post
Default cdosys email issue

Hi there, just got involved in coding(ish) and am strugling through. I'm a designer by trade so all of the technical stuff is tough. So please be patient with me as this may hopefully very easy to fix. Basically I'm getting this error from my forgoten password

Microsoft VBScript runtime error '800a01c2'

Wrong number of arguments or invalid property assignment: 'SendEmail'

/forgotten_password.asp, line 27

This is the code without the details which I know are correct as I've tested them via a test page

<!--#include file="Connections/mydb.asp" -->
Dim UsersRS__value
UsersRS__value = "0"
If (Request("Email") <> "") Then
UsersRS__value = Request("Email")
End If
Dim UsersRS
Dim UsersRS_numRows
Set UsersRS = Server.CreateObject("ADODB.Recordset")
UsersRS.ActiveConnection = MM_mydb_STRING
UsersRS.Source = "SELECT * FROM Customers WHERE CustomerEmail='" + Replace(UsersRS__value, "'", "''") + "' "
UsersRS.CursorType = 0
UsersRS.CursorLocation = 2
UsersRS.LockType = 3
UsersRS_numRows = 0
if Request("Selected") <> "" then
if not UsersRS.eof then
Response.Redirect "forgotten_password.asp?success=true"
end if
end if
function SendEmail(c)
Set objMail = Server.CreateObject("CDO.Message")
'This section provides the configuration information for the remote SMTP server.

objMail.Configuration.Fields.Item ("") = 2 'Send the message using the network (SMTP over the network).
objMail.Configuration.Fields.Item ("") ="intmail"
objMail.Configuration.Fields.Item ("") = 25
objMail.Configuration.Fields.Item ("") = False 'Use SSL for the connection (True or False)
objMail.Configuration.Fields.Item ("") = 60

' If your server requires outgoing authentication uncomment the lines below and use a valid email address and password.
objMail.Configuration.Fields.Item ("") = 1 'basic (clear-text) authentication
objMail.Configuration.Fields.Item ("") ="websales@******"
objMail.Configuration.Fields.Item ("") ="*****"


'End remote SMTP server configuration section==

objMail.From = "websales@*****"
objMail.To = c
objMail.Subject = "Your password"
objMail.HTMLBody = Mailbody
'objMail.TextBody = mailbody
Set objMail = Nothing
end function
<title>Forgotten Password</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="Styles.css">
<body bgcolor="#FFFFFF">
<!--#include file="Header.asp" -->
<div id="content">
<div id="breadCrumb">
<h2 id="pageName">Forgotten Password </h2>
<div class="story">
<%if Request("success") = "" then%>
<form name="form1" method="post" action="forgotten_password.asp">
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" class="story">
<td colspan="2" class="detail" >
Please enter your email address.</td>
<td colspan="2" >&nbsp;</td>
<%if Request("failed") <> "" then%>
<td height="24" colspan="2" align="center" >Your
Email address is not in our database.</td>
<%end if%>
<td width="30%" height="29" align="right"> <strong>Your
Email Address:</strong></td>
<td width="70%" >
<input name="Email" type="text" class="search-box" id="Email3" size="35">
<td width="30%" height="6" align="center">&nbsp;</td>
<td v height="6" width="70%"><input type="submit" name="Submit" value="Submit">
<input type="hidden" name="Selected" value="1">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<td width="100%">Thank you. Your password has been emailed
to you.</td>
<%end if%>
<!--#include file="footer.asp" -->
<!--#include file="NavBar.asp" -->
Set UsersRS = Nothing

Thanks in adavnce

Reply With Quote