Print Page | Close Window

At least one recipient is required....error

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
Printed Date: 01 October 2023 at 8:48am
Software Version: Web Wiz Forums 12.06 -

Topic: At least one recipient is required....error
Posted By: Blueie
Subject: At least one recipient is required....error
Date Posted: 18 March 2012 at 10:45am
I am getting the following server error message:


error '8004020c'

At least one recipient is required, but none were found.

/tell_a_friend.asp, line 67

Line 67 in the code below refers to this: ObjSendMail.Send
Is this problem related to the ASP file referred to here, since I don't know what that is:
<form method="post" action="sendtellafriend.asp"><br>
<title>Tell a Friend</title>
<table border="0" align="center"><tr><td align="left"><br>
<form method="post" action="sendtellafriend.asp"><br>
Your Name: <input type="text" name="fromname" size="20"><br>
Friend's name: <input type="text" name="friendname" size="20"><br>
Friend's Email: <input type="text" name="friendemail" size="30"><br>
<input type="submit" value="Tell a Friend about this website"><br>
</form> </td></tr></table>
<% fromname = Request("fromname")
friendname = Request("friendname")
friendemail = Request("friendemail")
msgBody = "Hello" & friendname & vbcrlf &"I have found a quality Web site and thought you may find it useful: -"& vbcrlf &vbcrlf & fromname
Set ObjSendMail = CreateObject("CDO.Message")
'This section provides the configuration information for the remote SMTP server.
ObjSendMail.Configuration.Fields.Item (" -") = 2 'Send the message using the network (SMTP over the network).
'ObjSendMail.Configuration.Fields.Item (" -") =""
ObjSendMail.Configuration.Fields.Item (" -") =""

ObjSendMail.Configuration.Fields.Item (" -") = 25
ObjSendMail.Configuration.Fields.Item (" -") = False 'Use SSL for the connection (True or False)
ObjSendMail.Configuration.Fields.Item (" -") = 60
' If server requires outgoing authentication uncomment lines below
ObjSendMail.Configuration.Fields.Item (" -") = 1 'basic (clear-text) authentication
ObjSendMail.Configuration.Fields.Item (" -") =" mailto:[email protected] - [email protected]"
ObjSendMail.Configuration.Fields.Item (" -") ="mySite"
'End remote SMTP server configuration section
ObjSendMail.To = friendemail
ObjSendMail.Subject = friendname & ", check this out."
ObjSendMail.From = fromname & ""

ObjSendMail.TextBody= msgBody

Set ObjSendMail = Nothing
Response.Redirect " -"
Thanks for any help.

Posted By: WebWiz-Bruce
Date Posted: 19 March 2012 at 9:42am
Unless you want to have your website abused by a spammer and blacklisted you should not use 'Tell a Friend' email applications. They died out about 10 years ago when spammers realised they could use these to send 1,000's of spam emails a minute in order to spam people.

-------------" rel="nofollow - Find Web Wiz on Facebook" rel="nofollow - Follow Web Wiz on Twitter

Posted By: Blueie
Date Posted: 21 March 2012 at 1:16am
Hello Bruce
Thanks for your reply.
Would that apply even if the site used the 'Captcha' images?

Posted By: WebWiz-Bruce
Date Posted: 21 March 2012 at 8:28am
Allot of bots have OCR built in now that is designed to read even the most unreadable CAPTCHA images, making CAPTCHA not that good a deterrent any more.

Facebook offer a tool which allows visitors to tell their friends through facebook. I would suggest using something like that instead.

-------------" rel="nofollow - Find Web Wiz on Facebook" rel="nofollow - Follow Web Wiz on Twitter

Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.06 -
Copyright ©2001-2023 Web Wiz Ltd. -