Skip to main content
AttaBoy2
Inspiring
February 15, 2009
Répondu

can't send form mail

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?
Ce sujet a été fermé aux réponses.
Meilleure réponse par kglad
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.

2 commentaires

kglad
Community Expert
Community Expert
February 16, 2009
you're welcome.
kglad
Community Expert
kgladCommunity ExpertRéponse
Community Expert
February 16, 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.
AttaBoy2
AttaBoy2Auteur
Inspiring
February 16, 2009
Thanks a bunch. The recipient property was all I needed to make it work.