我目前正在一个网站上工作...我遇到了一个错误...
我正在使用此邮件表格:
jQuery(document).ready(function($){
// hide messages
$("#error").hide();
$("#sent-form-msg").hide();
// on submit...
$("#contactForm #submit").click(function() {
$("#error").hide();
//required:
//name
var name = $("input#name").val();
if(name == ""){
$("#error").fadeIn().text("Name required.");
$("input#name").focus();
return false;
}
// email
var email = $("input#email").val();
if(email == ""){
$("#error").fadeIn().text("Email required");
$("input#email").focus();
return false;
}
// web
var web = $("input#web").val();
if(web == ""){
$("#error").fadeIn().text("Web required");
$("input#web").focus();
return false;
}
// comments
var comments = $("#comments").val();
// send mail php
var sendMailUrl = $("#sendMailUrl").val();
//to, from & subject
var to = $("#to").val();
var from = $("#from").val();
var subject = $("#subject").val();
// data string
var dataString = 'name='+ name
+ '&email=' + email
+ '&web=' + web
+ '&comments=' + comments
+ '&to=' + to
+ '&from=' + from
+ '&subject=' + subject;
// ajax
$.ajax({
type:"POST",
url: sendMailUrl,
data: dataString,
success: success()
});
});
// on success...
function success(){
$("#sent-form-msg").fadeIn();
$("#contactForm").fadeOut();
}
return false;
});
我的页面上有这个:收集信息并将其转发到电子邮件地址。
<!-- form -->
<form id="contactForm" action="#" method="post" />
<fieldset>
<p>
<label for="name">Naam</label>
<input name="name" id="name" type="text" class="form-poshytip" title="Enter your full name" />
</p>
<p>
<label for="email">Email</label>
<input name="email" id="email" type="text" class="form-poshytip" title="Enter your email address" />
</p>
<p>
<label for="comments">Bericht</label>
<textarea name="comments" id="comments" rows="5" cols="20" class="form-poshytip" title="Enter your comments"></textarea>
</p>
<!-- send mail configuration -->
<input type="hidden" value="kai.zaper@gmail.com" name="to" id="to" />
<input type="hidden" value="Jebike EmailForm mail" name="subject" id="subject" />
<input type="hidden" value="send-mail.php" name="sendMailUrl" id="sendMailUrl" />
<!-- ENDS send mail configuration -->
<p><input type="button" value="Send" name="submit" id="submit" /> <span id="error" class="warning">Oeps, er is iets fout gegaan, probeer opnieuw.</span></p>
</fieldset>
</form>
<p id="sent-form-msg" class="success">Uw email is verzonden.</p>
<!-- ENDS form -->
但它没有发送任何电子邮件。有人可以帮忙吗?