Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

can't send form mail

Enthusiast ,
Feb 15, 2009 Feb 15, 2009
This works fine!

<html>
<head>
<title>Mailform example</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form name="formmail" action="/cgi-bin/formmail/formmail.cgi" method="post">
<input type=hidden name="recipient" value="jimeast@jimsannex.com">
<p><b>Subject:</b><br>
<input type=text name="subject" size="45" value="">
</p>
<br>
<p><b>Your Name:</b><br>
<input type=text name="realname" size="45" value="">
</p>
<br>
<p><b>Your Email Address:</b><br>
<input type=text name="email" size="45" value="">
</p>
<br>
<p><b>Comments:</b><br>
<textarea name="body" rows="10" cols="60" wrap="virtual"></textarea>
</p>
<br>
<p>
<input type="submit" value="Send Email">
<input type="reset" value="Reset Form">
</p>
</form>
</body>
</html>

but when I try to do the same thing in flash

var gatherForm:LoadVars = new LoadVars();

function sendForm():Void {
gatherForm.email_to = "jimeast@jimsannex.com";
gatherForm.visitor_name = contactForm.nameInput.text;
gatherForm.visitor_email = contactForm.emailInput.text;
gatherForm.visitor_comments = contactForm.commentsInput.text;
gatherForm.send("/cgi-bin/formmail/formmail.cgi", "_blank", "POST");
}

this.contactForm.submitBtn.onRelease = function():Void {
sendForm();
}

I get this message:
Error: Bad/No Recipient
There was no recipient or an invalid recipient specified in the data sent to FormMail. Please make sure you have filled in the recipient form field with an e-mail address that has been configured in @recipients.

The recipient I have specified is jimsannex.com and it works fine with the html I listed on top. I'm using AS2. Any Ideas?
TOPICS
ActionScript
453
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Feb 15, 2009 Feb 15, 2009
there's no recipient property for gatherForm, no subject property, no email property and no body property. other than sending nothing the cgi file is expecting, you're doing fine.
Translate
Community Expert ,
Feb 15, 2009 Feb 15, 2009
there's no recipient property for gatherForm, no subject property, no email property and no body property. other than sending nothing the cgi file is expecting, you're doing fine.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 15, 2009 Feb 15, 2009
Thanks a bunch. The recipient property was all I needed to make it work.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 15, 2009 Feb 15, 2009
LATEST
you're welcome.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines