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).
URL: https://forums.webwiz.net/forum_posts.asp?TID=30226
Printed Date: 01 October 2023 at 8:48am
Software Version: Web Wiz Forums 12.06 - https://www.webwizforums.com


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
Hello
 
I am getting the following server error message:
 

CDO.Message.1

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>
 
<html>
<head>
<title>Tell a Friend</title>
</head>
<body>
 
<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>
<br>
<input type="submit" value="Tell a Friend about this website"><br>
</form> </td></tr></table>
</body>
</html>
 
<% 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: http://www.mySite.com - http://www.mySite.com"& vbcrlf &vbcrlf & fromname
Set ObjSendMail = CreateObject("CDO.Message")
'This section provides the configuration information for the remote SMTP server.
ObjSendMail.Configuration.Fields.Item (" http://schemas.microsoft.com/cdo/configuration/sendusing - http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network).
 
 
'ObjSendMail.Configuration.Fields.Item (" http://schemas.microsoft.com/cdo/configuration/smtp - http://schemas.microsoft.com/cdo/configuration/smtpserver") ="relay-hosting.smtp.mySite.com"
ObjSendMail.Configuration.Fields.Item (" http://schemas.microsoft.com/cdo/configuration/smtp - http://schemas.microsoft.com/cdo/configuration/smtpserver") ="smtp.mySite.com"
 
 

ObjSendMail.Configuration.Fields.Item (" http://schemas.microsoft.com/cdo/configuration/smtp - http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
ObjSendMail.Configuration.Fields.Item (" http://schemas.microsoft.com/cdo/configuration/smtpusessl - http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use SSL for the connection (True or False)
ObjSendMail.Configuration.Fields.Item (" http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout - http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
' If server requires outgoing authentication uncomment lines below
 
ObjSendMail.Configuration.Fields.Item (" http://schemas.microsoft.com/cdo/configuration/smtpauthenticate - http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication
ObjSendMail.Configuration.Fields.Item (" http://schemas.microsoft.com/cdo/configuration/sendusername - http://schemas.microsoft.com/cdo/configuration/sendusername") =" mailto:[email protected] - [email protected]"
ObjSendMail.Configuration.Fields.Item (" http://schemas.microsoft.com/cdo/configuration/send - http://schemas.microsoft.com/cdo/configuration/sendpassword") ="mySite"
ObjSendMail.Configuration.Fields.Update
'End remote SMTP server configuration section
ObjSendMail.To = friendemail
ObjSendMail.Subject = friendname & ", check this out."
ObjSendMail.From = fromname & "@mySite.com"

ObjSendMail.TextBody= msgBody
ObjSendMail.Send

Set ObjSendMail = Nothing
Response.Redirect " http://www.mySite.com - www.mySite.com"
%>
 
Thanks for any help.



Replies:
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.

-------------
http://www.facebook.com/WebWiz" rel="nofollow - Find Web Wiz on Facebook
http://twitter.com/WebWizUK" 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?
 
Thanks.
 
Blue


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.


-------------
http://www.facebook.com/WebWiz" rel="nofollow - Find Web Wiz on Facebook
http://twitter.com/WebWizUK" rel="nofollow - Follow Web Wiz on Twitter



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.06 - https://www.webwizforums.com
Copyright ©2001-2023 Web Wiz Ltd. - https://www.webwiz.net