0 Replies Latest reply on May 11, 2009 5:17 AM by Didika12

    Sending email over ASP (POST method)

    Didika12

      I have a problem with sending email from a flash contact form using ASP. I'm trying to send data to ASP with the POST method, and then send an e-mail using ASP code, but it doesn't work. In fact, when pressing the submit button in a Flash contact form, in IExplorer nothing happens, and in Mozilla I get a message Waiting for ....

       

      This a Flash button code:
      on (release) {
          this.gotoAndPlay("release");
          var formName = _parent.form_mc.name;
          var formCompany = _parent.form_mc.company;
          var formEmail = _parent.form_mc.email;
          var formMessage = _parent.form_mc.message;
          if (formName != undefined && formEmail != undefined && formMessage != undefined) {
              _parent.form_mc.loadVariables ("mail.asp", 0, vars=POST)
              _parent.submit = true;
          } else {
              _global.stickyName = formName;
              _global.stickyCompany = formCompany;
              _global.stickyEmail = formEmail;
              _global.stickyMessage = formMessage;
              _parent.error = true;
              _parent.submit = false;
              _parent.gotoAndPlay("error");
          }
      }

       

      and this is the mail.asp code:

       

      <%
      Dim formName, formCompany, formEmail, formMessage

       

      formName=request.form("formName")
      formCompany=request.form("formCompany")
      formEmail=request.form("formEmail")
      formMessage=request.form("formMessage")

       


      Set myMail=CreateObject("CDO.Message")
      myMail.Subject=formMessage
      myMail.From=formEmail
      myMail.To="test@netuse.com"

       


      myMail.Configuration.Fields.Item _
      ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2
      'Name or IP of remote SMTP server
      myMail.Configuration.Fields.Item _
      ("http://schemas.microsoft.com/cdo/configuration/smtpserver") _
      ="mail.netuse.com"
      'Server port
      myMail.Configuration.Fields.Item _
      ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _
      =25
      myMail.Configuration.Fields.Update
      myMail.Send
      set myMail=nothing
      %>

       

      and this is the HTML code:

       

      <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
      <title>6</title>
      </head>
      <body bgcolor="#0066ff">

       

      <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="520" height="500" id="6" align="middle">
      <param name="allowScriptAccess" value="sameDomain" />
      <param name="movie" value="6.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#0066ff" /><embed src="6.swf" quality="high" bgcolor="#0066ff" width="520" height="500" name="6" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
      </object>
      </body>
      </html>

       


      Does anyone have an idea what might be the problem? I have the code uploaded on colleagues' computer on which sending emails through HTML+ASP works perfectly.

       

       

       

      Thank you very much in advance