|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Help with CDO issue
9 and i have a contact page with prefilled text boxes for name email phone and message: this flash code calls for an ASP script. Very rusty with this, i review most of the notes and i get an error: CDO.Message.1 error '8004020d' At least one of the From or Sender fields is required, and neither was found. /contact.asp, line 20 here is the flash9 code for ref: rec="supp***@micotechnology.com"; serv="asp"; var fields_descriptions= Array ("", Array("t1", "your_name", "Your Name:"), Array("t2", "your_email", "Your Email:"), Array("t3", "telephone", "Telephone:"), Array("t4", "message", "Message:"), Array("t5", "field_2", "E-mail:"), Array("t6", "field_3", "Address:"), Array("t7", "field_4", "fax:") ); function reset_txt(name,name2,value) { path=eval(_target); path[name2]=""; } for (i=1; i<=fields_descriptions.length; i++) { reset_txt("t"+i, fields_descriptions[i][1], fields_descriptions[i][2]); } and here is the .asp: <% for i=1 to 7 message=Request("message") next message=message + Request("message") smtpServer = "smtpout.secureserver.net" smtpPort = 25 name = Request("Your_Name:") Set myMail = CreateObject("CDO.Message") myMail.Subject = "from " & name myMail.From = Request("Your_Email:") myMail.To = Request("recipient") myMail.HTMLBody = "<html><head><title>Contact letter</title></head><body><br>" & 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 %> What the heck am i doing wrong here? i tried everything. thanks in advance url:http://www.ureader.com/gp/1522-1.aspx Show quote
"Michael Iannaccone" <micotechnol***@gmail.com> wrote in message The above code looks like nonsense to me. Access the same field value 7news:7a76b2b6894e4d9eaea59ee0a2452309@newspe.com... > I have some code here... it is attached to my website.. the website is flash > 9 and i have a contact page with prefilled text boxes for name email phone > and message: this flash code calls for an ASP script. Very rusty with this, > i review most of the notes and i get an error: > > CDO.Message.1 error '8004020d' > > At least one of the From or Sender fields is required, and neither was found. > > > /contact.asp, line 20 > > here is the flash9 code for ref: > > rec="supp***@micotechnology.com"; > serv="asp"; > > var fields_descriptions= Array ("", > Array("t1", "your_name", "Your Name:"), > Array("t2", "your_email", "Your Email:"), > Array("t3", "telephone", "Telephone:"), > Array("t4", "message", "Message:"), > Array("t5", "field_2", "E-mail:"), > Array("t6", "field_3", "Address:"), > Array("t7", "field_4", "fax:") > ); > > function reset_txt(name,name2,value) { > path=eval(_target); > path[name2]=""; > } > > > > for (i=1; i<=fields_descriptions.length; i++) { > reset_txt("t"+i, fields_descriptions[i][1], fields_descriptions[i][2]); > } > > and here is the .asp: > > <% > for i=1 to 7 > message=Request("message") > next > message=message + Request("message") times and assign it over and over into the same variable then append the final value with another duplicate of the field value??! What's that all about? > smtpServer = "smtpout.secureserver.net" Use Request.Form("Your_Name") explicitly and I suspect the field name> smtpPort = 25 > > > name = Request("Your_Name:") doesn't contain a colon at the end. > Set myMail = CreateObject("CDO.Message") Since the from field is the best place to indicate where the email is form> myMail.Subject = "from " & name isn't there a better use for the subject property? > myMail.From = Request("Your_Email:") Use:-myEmail.From = """" & name & """ <" & Request.Form("Your_Email") & ">" > myMail.To = Request("recipient") Use Server.HTMLEncode(message). If message contains < or & the HTML> myMail.HTMLBody = "<html><head><title>Contact > letter</title></head><body><br>" & message & "</body></html>" generated would be corrupt. Show quote > myMail.Configuration.Fields.Item("http://schemas.microsoft. I don't know anything about Flash and how or even if it emulates HTML Forms.> 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 > %> > > > > What the heck am i doing wrong here? i tried everything. thanks in advance > First thing I would do is built a simple HTML form that contains all the fields you need. Then test your ASP code using the HTML form. When thats working you can test the flash. If the flash doesn't work you'll know where the fault is. -- Anthony Jones - MVP ASP/ASP.NET
Other interesting topics
|
|||||||||||||||||||||||