Cdo Message 1 Error 8004020c
tjbcr, Jan 12, 2007. Thread Status: Not open for further replies. tjbcr I have a form on an asp page to send the clients thier usernames and passwords. the code I am using worked on another client's site (hosted elsewhere) but the modified code does not seem to work on discountasp. I get the following error message CDO.Message.1 error '8004020c' At least one recipient is required, but none were found. /asp/send_password.asp, line 39 Below is the code: Any suggestions? Dim LostPassword__EmailParam LostPassword__EmailParam = "me@myemail.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_Recipes_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 Dim ConfirmMessage ConfirmMessage = "" IF (NOT LostPassword.EOF) THEN set sysMail = Server.CreateObject("CDO.Message") sysMail.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.mysite.com" sysMail.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 sysMail.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "" sysMail.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "" sysMail.Configuration.Fields.Update sysMail.From = "me@myemailaddress.com" sysMail.To = cStr(Request("EmailAddress")) sysMail.Subject = "Re:YourLogin 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 %> tjbcr, Jan 12, 2007 #1 raymondp DiscountASP.NET Staff It looks like the variables for the To address is not being passed. Try hardcoding it as a test. Second, make sure you set your web application to use 'localhost' as the smtp server. The dasp email servers do not allow web applications to relay emails to them. raymondp, Jan 17, 2007 #2 (You must log in or sign up to reply here.) Show Ignored Content Thread
Unanswered Topics Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > ASP CDO CDO.Message.1 (0x8004020C) At least one recipient User Name Remember Me? Password Reminder Password Register Register | FAQ | Members List | Calendar | Today's Posts | Search ASP CDO As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here. Search Forums Show Threads Show Posts Advanced http://community.discountasp.net/threads/error-8004020c-having-trouble-getting-my-asp-page-to-email-usernames-and-passwords.3875/ Search Find All Thanked Posts Go to Page... Welcome to the p2p.wrox.com Forums. You are currently viewing the ASP CDO section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to http://p2p.wrox.com/asp-cdo/18343-cdo-message-1-0x8004020c-least-one-recipient.html other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free . Thread Tools Display Modes #1 (permalink) September 13th, 2004, 11:19 PM widad Authorized User Join Date: Sep 2004 Location: , , . Posts: 17 Thanks: 0 Thanked 0 Times in 0 Posts CDO.Message.1 (0x8004020C) At least one recipient Hi, I am a newbie for ASP and I am running a simple asp file which retrieves email addresses from the database and collects the result into a string. Once the string is availbel i am using it to send e-mail using CDO.The program is sending e-mail to everyuser in the string it has collected.everything is ok.But its showing an error page which i don't want to see.the error is CDO.Message.1 (0x8004020C) At least one recipient is required, but none were found. This is my program.Please help. <%@ Language=VBScript %> <% str="z687606,z682045," str= REplace(trim(str)," ","") str1=split(str,",") Dim objConn ' Connection Name Dim strConn ' Connection String Dim objRS ' Recordset Variable Dim strSQL ' variable for SQL statement Dim intTotalColumns Dim intCounter Const adOpenStatic = 3 Const adLockReadOnly = 1 Set objConn = Server.CreateObject("ADODB.Connection") Set objRS = Server.CreateObject("ADODB.Recordset") strConn =
Join INTELLIGENT WORK FORUMSFOR COMPUTER PROFESSIONALS Log In Come Join Us! Are you aComputer http://www.tek-tips.com/viewthread.cfm?qid=1322493 / IT professional?Join Tek-Tips Forums! Talk With Other Members Be Notified Of ResponsesTo Your Posts Keyword Search One-Click Access To YourFavorite Forums Automated SignaturesOn Your Posts Best Of All, It's Free! Join Us! *Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive cdo message e-mail. Posting Guidelines Promoting, selling, recruiting, coursework and thesis posting is forbidden.Tek-Tips Posting Policies Jobs Jobs from Indeed What: Where: jobs by Link To This Forum! Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.Just copy and paste the BBCode HTML Markdown MediaWiki reStructuredText cdo message 1 code below into your site. Microsoft: ASP (Active Server Pages) Forum at Tek-Tips HomeForumsProgrammersWeb DevelopmentMicrosoft: ASP (Active Server Pages) Forum need to email user name & password, get CDO.Message.1 error '8004020c' thread333-1322493 Forum Search FAQs Links MVPs need to email user name & password, get CDO.Message.1 error '8004020c' need to email user name & password, get CDO.Message.1 error '8004020c' dhdweb (MIS) (OP) 15 Jan 07 14:33 I am using the following code to send lost passwords to group, but get "CDO.Message.1 error '8004020c' " as an error. <%Dim LostPassword__EmailParamLostPassword__EmailParam = "me@mysite.com"If (Request.Form("EmailAddress") <> "") Then LostPassword__EmailParam = Request.Form("EmailAddress")End If%><%Dim LostPasswordDim LostPassword_numRowsSet LostPassword = Server.CreateObject("ADODB.Recordset")LostPassword.ActiveConnection = MM_myconnection_STRINGLostPassword.Source = "SELECT UserName, UserPasswordFROM UsersWHERE UserEmail = '" + Replace(LostPassword__EmailParam, "'", "'") + "'"LostPassword.CursorType = 0LostPassword.CursorLocation = 2LostPassword.LockType = 1LostPassword.Open()LostPassword_numRows = 0%><%Dim strToDim ConfirmMessageConfirmMessage = ""IF (NOT LostPassword.EOF) THENset sysMail = Server.CreateObject("CDO.Message")strTo = Request.Form("EmailAddress"