Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need to email user name & password, get CDO.Message.1 error '8004020c'

Status
Not open for further replies.

dhdweb

MIS
Dec 21, 2005
1
US
I am using the following code to send lost passwords to group, but get "CDO.Message.1 error '8004020c' " as an error.
<%
Dim LostPassword__EmailParam
LostPassword__EmailParam = "me@mysite.com"
If (Request.Form("EmailAddress") <> "") Then
LostPassword__EmailParam = Request.Form("EmailAddress")
End If
%>
<%
Dim LostPassword
Dim LostPassword_numRows
Set LostPassword = Server.CreateObject("ADODB.Recordset")
LostPassword.ActiveConnection = MM_myconnection_STRING
LostPassword.Source = "SELECT UserName, UserPassword FROM Users WHERE UserEmail = '" + Replace(LostPassword__EmailParam, "'", "''") + "'"
LostPassword.CursorType = 0
LostPassword.CursorLocation = 2
LostPassword.LockType = 1
LostPassword.Open()
LostPassword_numRows = 0
%>
<!--#include file="adovbs.inc" -->
<%
Dim strTo
Dim ConfirmMessage
ConfirmMessage = ""
IF (NOT LostPassword.EOF) THEN
set sysMail = Server.CreateObject("CDO.Message")
strTo = Request.Form("EmailAddress")
sysMail.Configuration.Fields(" ="smtp.nyaapor.net"
sysMail.Configuration.Fields(" = 2
sysMail.Configuration.Fields(" = ""
sysMail.Configuration.Fields(" = ""
sysMail.Configuration.Fields.Update
sysMail.From = "me@mysite.com"
sysMail.To = strTo
sysMail.Subject = "Re:Your Login Information"
sysMail.TextBody = "UserName: " & LostPassword.Fields("UserName").value & vbCrlf & "Password: " & LostPassword.Fields("UserPassword").value
sysMail.Send
ConfirmMessage = "Your login information has been sent to: " & cStr(Request("EmailAddress"))
END IF
%>

PLEASE HELP!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top