PC Review


Reply
Thread Tools Rating: Thread Rating: 2 votes, 1.00 average.

CDO.Message.1 error '8004020c'

 
 
=?Utf-8?B?amFtZXM=?=
Guest
Posts: n/a
 
      10th Feb 2006
Im trying to use a form through a flash file. the flash file calls the .asp
script then i get this error

CDO.Message.1 error '8004020c' At least one recipient is required, but none
were found./contact.asp, line 20

Here is the asp script what is wrong
does the recipient need an address?
<%
Set reg = New RegExp
reg.Pattern = "^[A-Za-z0-9\._\-]+@([A-Za-z0-9\._\-]+\.)+[A-Za-z0-9\._\-]+$"
Set m = reg.Execute(Request.QueryString("your_email"))

if m.count > 0 then
smtpServer = "swapper.loc"
smtpPort = 25

name = Request.QueryString("your_name")
Set myMail = CreateObject("CDO.Message")
myMail.Subject = "from " & name
myMail.From = Request.QueryString("your_email")
myMail.To = Request.QueryString("recipient")
myMail.HTMLBody = "<html><head><title>Contact
letter</title></head><body><br>" & Request.QueryString("message") &
"</body></html>"
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpServer
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = smtpPort
myMail.Configuration.Fields.Update
myMail.Send
Response.Write("Your email was sent")
else
Response.Write("Invalid email")
End if

%>
<script>
resizeTo(300, 300)
//window.close()
</script>


--
Slowly but surely
 
Reply With Quote
 
 
 
 
Mark Fitzpatrick
Guest
Posts: n/a
 
      10th Feb 2006
I would try dumping the various fields to the browser to make sure that you
are really getting the values you think. Try dumping the
Response.Write(Request.QueryString("recipient")) to make sure that the
recipient querystring variable is not blank. If it's blank, this would be
the error you would expect to see. If it is blank, make sure that the
spelling on all the form fields is correct. It's very easy to misspell it in
the form than try accessing it with the correct spelling in code.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"james" <(E-Mail Removed)> wrote in message
news:E9FAF178-F13F-4663-B529-(E-Mail Removed)...
> Im trying to use a form through a flash file. the flash file calls the
> .asp
> script then i get this error
>
> CDO.Message.1 error '8004020c' At least one recipient is required, but
> none
> were found./contact.asp, line 20
>
> Here is the asp script what is wrong
> does the recipient need an address?
> <%
> Set reg = New RegExp
> reg.Pattern =
> "^[A-Za-z0-9\._\-]+@([A-Za-z0-9\._\-]+\.)+[A-Za-z0-9\._\-]+$"
> Set m = reg.Execute(Request.QueryString("your_email"))
>
> if m.count > 0 then
> smtpServer = "swapper.loc"
> smtpPort = 25
>
> name = Request.QueryString("your_name")
> Set myMail = CreateObject("CDO.Message")
> myMail.Subject = "from " & name
> myMail.From = Request.QueryString("your_email")
> myMail.To = Request.QueryString("recipient")
> myMail.HTMLBody = "<html><head><title>Contact
> letter</title></head><body><br>" & Request.QueryString("message") &
> "</body></html>"
> myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
> = 2
> myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")
> = smtpServer
> myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")
> = smtpPort
> myMail.Configuration.Fields.Update
> myMail.Send
> Response.Write("Your email was sent")
> else
> Response.Write("Invalid email")
> End if
>
> %>
> <script>
> resizeTo(300, 300)
> //window.close()
> </script>
>
>
> --
> Slowly but surely



 
Reply With Quote
 
Stefan B Rusynko
Guest
Posts: n/a
 
      11th Feb 2006
PS
the simple regex will fail in many cases on valid email addresses according to RFC 822
For more robust ones see http://regexlib.com/Search.aspx?k=email

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPa...3/Default.aspx
_____________________________________________


"Mark Fitzpatrick" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
|I would try dumping the various fields to the browser to make sure that you
| are really getting the values you think. Try dumping the
| Response.Write(Request.QueryString("recipient")) to make sure that the
| recipient querystring variable is not blank. If it's blank, this would be
| the error you would expect to see. If it is blank, make sure that the
| spelling on all the form fields is correct. It's very easy to misspell it in
| the form than try accessing it with the correct spelling in code.
|
| Hope this helps,
| Mark Fitzpatrick
| Microsoft MVP - FrontPage
|
| "james" <(E-Mail Removed)> wrote in message
| news:E9FAF178-F13F-4663-B529-(E-Mail Removed)...
| > Im trying to use a form through a flash file. the flash file calls the
| > .asp
| > script then i get this error
| >
| > CDO.Message.1 error '8004020c' At least one recipient is required, but
| > none
| > were found./contact.asp, line 20
| >
| > Here is the asp script what is wrong
| > does the recipient need an address?
| > <%
| > Set reg = New RegExp
| > reg.Pattern =
| > "^[A-Za-z0-9\._\-]+@([A-Za-z0-9\._\-]+\.)+[A-Za-z0-9\._\-]+$"
| > Set m = reg.Execute(Request.QueryString("your_email"))
| >
| > if m.count > 0 then
| > smtpServer = "swapper.loc"
| > smtpPort = 25
| >
| > name = Request.QueryString("your_name")
| > Set myMail = CreateObject("CDO.Message")
| > myMail.Subject = "from " & name
| > myMail.From = Request.QueryString("your_email")
| > myMail.To = Request.QueryString("recipient")
| > myMail.HTMLBody = "<html><head><title>Contact
| > letter</title></head><body><br>" & Request.QueryString("message") &
| > "</body></html>"
| > myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
| > = 2
| > myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")
| > = smtpServer
| > myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")
| > = smtpPort
| > myMail.Configuration.Fields.Update
| > myMail.Send
| > Response.Write("Your email was sent")
| > else
| > Response.Write("Invalid email")
| > End if
| >
| > %>
| > <script>
| > resizeTo(300, 300)
| > //window.close()
| > </script>
| >
| >
| > --
| > Slowly but surely
|
|


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Mail Error Sending a Message - Non-specific Error Message DP4Jesus7 Windows Vista Mail 8 9th Apr 2008 08:37 PM
Error messages generated when I open a message the error message c =?Utf-8?B?QnJvb2tzMTk0Ng==?= Microsoft Outlook Discussion 3 11th Aug 2007 06:42 PM
CDO.Message.1 error '8004020c' =?Utf-8?B?amFtZXM=?= Microsoft Access 0 10th Feb 2006 01:07 AM
Error message Kernel 32 causes an error message in krnl.383.exe Dan Windows XP Internet Explorer 3 9th Mar 2004 02:12 PM
Error message immediately after loading XP home --> nvcpl.dll error message Steven Windows XP Setup 1 1st Dec 2003 12:38 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:16 PM.