My host has a formmail.cgi script to send html form data to emails (http://formmail.dreamhost.com/), but I dont understand how to pass it values that it understands.
Ive tried using this method to pass form values:
HTML:
<form id="contact_form" action="http://formmail.dreamhost.com/cgi-bin/formmail.cgi" method="POST">
<input type=hidden name="recipient" value="info#raphaelguilleminot.com">
<input type="hidden" name="subject" value="Message from Raphael's portfolio site" />
<input type=text id="email" class="email default-value" name="email" value="Your email">
<label class="error" for="email" id="email_error">your email is required</label>
<textarea id="message" class="contact_message default-value" name="message" value="your message">Tell me whats on your mind!</textarea><br/>
<input class="submit button" type="submit" value="Send" />
</form>
Jquery:
$(".button").click(function() {
var dataString = 'recipient=info#raphaelguilleminot.com' + 'name='+ name + '&email=' + email + '&message=' + message;
$.ajax({
type: "POST",
url: "http://formmail.dreamhost.com/cgi-bin/formmail.cgi",
data: dataString,
success: function() {
$('#contact_form').hide().fadeIn(1500)
}
});
return false;
});
});
Any ideas?