0
我想用下面的代码我写蟒蛇发送电子邮件/下文称将参数传递给邮件脚本
<script>
$(document).ready(function() {
$("#form1").submit(function(){
$("#form1").validationEngine();
if($('div input[type=text]').val() != "")
{
var textfield2=document.getElementById("textfield2").value;
var textarea=document.getElementById("textarea").value;
var dataS=$("#form1").serialize();
$.ajax({
type: "POST",
crossDomain: 'true',
url: "mail.py",
success: function(){
alert("completed");
},
error: function(){
alert(dataS);
}
});
}
return false;
});
});
</script>
对于邮件的一部分,我下文称下面的谷歌代码
from google.appengine.api import mail
mail.send_mail(sender="Example.com Support <[email protected]>",
to="Albert Johnson <[email protected]>",
subject="Your account has been approved",
body="""
Dear Albert:
Your example.com account has been approved. You can now visit
http://www.example.com/ and sign in using your Google Account to
access new features.
Please let us know if you have any questions.
The example.com Team
""")
现在的问题是,在ajax调用..我怎样才能在mail.py脚本中接收HTML参数?请帮助我是python新手