Getting a "At least one recipient is required, but none were found." error message

This is a discussion on "Getting a "At least one recipient is required, but none were found." error message" within the Classic ASP section. This forum, and the thread "Getting a "At least one recipient is required, but none were found." error message are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Feb 13th, 2006, 10:34
New Member
Join Date: Feb 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Getting a "At least one recipient is required, but none were found." error message

Hi I'm getting an error message from a forgott user password send mail script and I can't seem to see where I'm going wrong.

The db field for the email address is called user

Here is the script:

<%Dim Mail
Const cdoSendUsingMethod = "http://schemas.microsoft.com/cdo/con...tion/sendusing"
Const cdoSendUsingPort = 2
Const cdoSMTPServer = "http://schemas.microsoft.com/cdo/con...ion/smtpserver"
Const cdoSMTPServerPort = "http://schemas.microsoft.com/cdo/con...smtpserverport"
Const cdoSMTPConnectionTimeout = "http://schemas.microsoft.com/cdo/con...nectiontimeout"
Const cdoSMTPAuthenticate = "http://schemas.microsoft.com/cdo/con...tpauthenticate"
Const cdoBasic = 1
Const cdoSendUserName = "http://schemas.microsoft.com/cdo/con...n/sendusername"
Const cdoSendPassword = "http://schemas.microsoft.com/cdo/con...n/sendpassword"

Dim objConfig ' As CDO.Configuration
Dim Fields
Dim objMessage
Dim Body



Set objConfig = Server.CreateObject("CDO.Configuration")
Set Fields = objConfig.Fields
With Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "mail.mydomain.co.uk"
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPConnectionTimeout) = 10
.Item(cdoSMTPAuthenticate) = cdoBasic
.Item(cdoSendUserName) = "admin@mydomain.co.uk" ' replace with the username
.Item(cdoSendPassword) = "milme" ' and password for the smtp server you're using
.Update
End With

Set objMessage = Server.CreateObject("CDO.Message")

Set objMessage.Configuration = objConfig %>
<%Dim Pears
Set Pears = Server.CreateObject("ADODB.Connection")
Conn = "DRIVER={Microsoft Access Driver (*.mdb)}; "
Conn = Conn & "DBQ=" & Server.MapPath("../../db/mydb.mdb")
Pears.Open(Conn)
SQLtemp = "SELECT * FROM [password] WHERE [user] = '" & request.querystring("get") & "' "
Set rs = Pears.Execute(SQLtemp)
If rs.bof And rs.eof Then
response.redirect ("forgot2.asp?msg2=no&msg=We+could+not+find+you r+e-mail+address+in+our+database.+Please+join+below.")
Else
End If
%>

<%

objMessage.To = user ' your recipient
objMessage.From = "admin@sedao.co.uk" ' your sender
objMessage.Subject = "Thanks for your enquiry"


buf = "Dear " & rs("name") & vbCrLf
buf = buf & " " & vbCrLf
buf = buf & "Thanks for your enquiry." & vbCrLf
buf = buf & " " & vbCrLf
buf = buf & "Your password is:" & " " & rs("pass") & vbCrLf
buf = buf & " " & vbCrLf
buf = buf & "Regards" & vbCrLf
buf = buf & "The Administrator" & vbCrLf
objMessage.HtmlBody = buf%>
<%
objMessage.Send
Set objMessage = Nothing
response.redirect ("forgot2.asp?msg2=yes&msg=Your+password+was+send+ to+" & request.querystring("get"))

%>
Can anyone see where I'm going wrong?

thanks in advance.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Feb 15th, 2006, 14:02
New Member
Join Date: Feb 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Getting a "At least one recipient is required, but none were found." error message

I sorted it I hadn't completed the "Else" statement. Doh
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
getting, quotat, least, recipient, required, but, none, were, foundquot, error, message

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a "tag" system to find relevant "related" pages MrQuestions PHP Forum 3 Mar 20th, 2008 23:06
[SOLVED] Getting the &quot;Microsoft JET Database Engine error '80040e14'&quot; error. VegaLA Classic ASP 3 Jan 26th, 2008 00:12
? IS "meta name="robots" content="?" necessary in pages ? Love2Java Starting Out 6 Aug 8th, 2007 13:48
Flash "Click Here to Activate" message lyndaelyzoo Flash & Multimedia Forum 3 Jul 6th, 2007 03:01
window.opener.document["nameForm"].getElementById("someid").value; doesnt work drpompeii JavaScript Forum 0 Feb 17th, 2007 23:09


All times are GMT. The time now is 14:11.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42